Why can two floating-point values have the same significand but different magnitudes? The exponent sets the scale: a significand is multiplied by the radix raised to that exponent. In decimal, 12345 × 10⁻² is 123.45. Binary floating-point uses radix 2 instead. section 3.1.1
A JavaScript Number uses IEEE-754 Binary64: one sign bit, 11 exponent bits, and 52 significand bits. The stored exponent is biased by 1023, so an exponent of −2 is stored as 1021. For the illustrated normal-value encoding, the scale factor is 2 raised to the stored exponent minus 1023. section 3.1.1
Table 3.3 Representing 0.1 and 0.2 as floating-point numbers
|
Value
|
Sign
|
Exponent
|
Significand
|
|
0.1
|
0
|
01111111011
|
1.1001100110011001100110011001100110011001100110011010
|
|
0.2
|
0
|
01111111100
|
1.1001100110011001100110011001100110011001100110011010
|
The encodings of 0.1 and 0.2 have the same significand but different exponents. Adding them requires aligning their exponents first. section 3.1.1





