Skip to content

Comment on An Interview with the Old Man of Floating-Point (1998)parent

Comments

the entire real number line

I'm not a mathematician but perhaps one could confirm, this is wrong, no? Irrationals e.g. Pi, sqrt2, cannot be represented. The floating point numbers are like a finite number of teeth on a comb pressed against the continuous real line.

Exactly. Floating-point numbers cannot represent such numbers without error, yet we still see people asserting that floats represent "the entire real number line." The first format to represent such numbers honestly was the original unum format, where the last bit of the fraction indicates if the number is exact or represents the open interval between exact numbers. Like saying pi is 3.14... means pi is between 3.14 and 3.15, a mathematically honest statement. The presence or absence of "..." as a bit in the number was the main idea behind unum arithmetic.

Sure. Obviously, it is only a finite sampling of the real number line, and it is only sampling at a particular set of rational numbers. But it is a sampling with a density that is (roughly) scale invariant. That enables FP computations to have (roughly) the same precision regardless of the overall scaling (choice of units), and that underlies the illusion that you have the whole number line at your disposal when you do computations with FP numbers.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.