Why are so many decimal digits provided?
Because 40 decimal digits are needed to ensure that internal floating point values are defined correctly after rounding for floating-point hardware up to 128 significand bits. (For interval constants, twice as many as significand digits are needed to ensure that decimal digit strings are exactly representable C++ values). If the Standard C float.h is available, the macro FLT_MANT_DIG may provide the number of digits (usually radix 2) in the significand (mantissa) that limits precision (but not the maximum or minimum values : these constrained mainly by the maximum exponent).