liveBook · Manning

Exponent

As explained in JavaScript in Depth

A value specifying the power to which a radix is raised to scale a significand.

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

How JavaScript in Depth covers it

How deep it goes
Defines the exponent and works through its 11-bit biased Binary64 representation.
Examples
Uses 12345 × 10⁻² and the binary encodings of 0.1 and 0.2.
What it assumes
Assumes an introduced radix and defines the exponent and significand before examining their encoding.
What you can do after
Evaluate/understand how stored exponents determine floating-point scale and why addition requires exponent alignment.
How it connects
Connects the exponent to radix, significand, scientific notation, and floating-point arithmetic.

Also explained in

Compare how 6 books explain exponent →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of JavaScript in Depth. The section links point to the parts of the book it draws on.