Home > Net >  Why does underflow with floating points happen at 2⁻¹²⁶?
Why does underflow with floating points happen at 2⁻¹²⁶?

Time:09-15

When representing a float, why does the exponent face underflow when it hits 2−126 if 8 bits can hold everything from −127 (incl.) to 128 (incl.)?

CodePudding user response:

Exponents range from −126 to 127 because exponents of −127 (all 0s) and 128 (all 1s) are reserved for special numbers. wikipedia

  • Related