marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.01k stars 793 forks source link

Correction on floating point representation #463

Closed erimcg closed 5 years ago

erimcg commented 5 years ago

In the section on values in chapter 1, when first discussing floating point numbers you state "To do this, some of the bits are used to store the position of the decimal point." The position of the decimal point is not stored. Floating point numbers are represented according to the IEEE 754 standard which stores a sign, mantissa, and exponent.

marijnh commented 5 years ago

Well, it's technically a binary point, but that is pretty much what the exponent is—the position of the point. And since point notation is referred to as 'decimal point' in English, I think my description is correct enough without getting into too much detail.