Max float is defied as:
math.h
#define MAXFLOAT 0x1.fffffep+127f
I'm a little sad I never noticed this before. What's this actually say? I would have expected something like this:
#define MAXFLOAT 0xFFFFFFFF-1
Would that even work?
0x1.fffffep+127
is (roughly)
1.99999999999999999999998 times 2^127. It's a floating point number, with an exponent, in hexadecimal.
0x
= hex notation1
= integer part of the number.fffffe
= fractional part of the numberp+127
= scientific notation for "times two to the 127th power"If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With