Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Why Are Float Ranges So Hard, and Can We Do Better?

The Julia Programming Language via YouTube

Overview

Coursera Spring Sale
40% Off Coursera Plus Annual!
Grab it
Explore the complex mathematical challenges behind floating-point ranges in Julia programming through this 26-minute conference talk from JuliaCon Global 2025. Delve into why interpreting float ranges like 0.1:0.2:0.7 presents unexpected computational difficulties, particularly when determining whether 0.1 was intended to represent the fraction 1/10. Learn about Julia's current approach of computing the simplest fraction for each float value and checking validity, and discover why this method can fail, leading to ranges that are too short or contain incorrect interior points. Understand how some valid range interpretations require considering start, step, and stop values together rather than independently rationalizing individual float values. Examine the formal definition of what constitutes a valid interpretation of a floating-point range as a triple of rationals, and explore the challenge of selecting the optimal interpretation from infinite possibilities. Discover how this seemingly simple problem connects to advanced mathematical concepts including integer linear programming, numerical semigroup theory, and the Stern-Brocot tree of fractions, while maintaining the computational efficiency required for range object construction.

Syllabus

Why are float ranges so hard, and can we do better? | Karpinski | JuliaCon Global 2025

Taught by

The Julia Programming Language

Reviews

Start your review of Why Are Float Ranges So Hard, and Can We Do Better?

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.