How can I find the maximium number of decimal digits representable in a double?

What is the maximum precision of double?

numeric_limits<double>::?????

default precision is 6 digits after the period
Last edited on
Wikipedia wrote:
The 53-bit significand precision gives from 15 to 17 significant decimal digits precision
https://en.wikipedia.org/wiki/Double-precision_floating-point_format

Note that it's talking about significant digits, not digits after the decimal separator.

If you print more digits than this you cannot expect them to be accurate.
how can this be obtained from numeric_limits<double> ?
Topic archived. No new replies allowed.