As far as I know floating point values are of the form n * 2^e, with
- float range being n = -(2^23-1) - (2^23-1), and e = -126 - 127,
- double range being n = -(2^52-1) - (2^52-1), and e = -1022 - 1023
I was looking through the C++ standard, but failed to find the place where the standard specifies this, or mandates the association of the float, double and long double types with ranges defined in other (IEEE) standards. The only related thing I found in 3.9.1.8 is:
There are three floating point types: float, double, and long double. The type double provides at least as much precision as float, and the type long double provides at least as much precision as double. The set of values of the type float is a subset of the set of values of the type double; the set of values of the type double is a subset of the set of values of the type long double. The value representation of floating-point types is implementation-defined.
And no mention of the minimum range provided by the type.
Where/how does the standard specify the (minimum?) value range of the floating point types? Or can a compiler freely choose any value range and still be standard compliant?