What is the meaning of numeric_limits::digits10

后端 未结 5 997
灰色年华
灰色年华 2020-11-29 07:46

What is the precise meaning of numeric_limits::digits10? Some other related questions in stackoverflow made me think it is the maximum precision of a double, but

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 08:29

    The '53' is the bit width of the significand that your type (double) holds. The '15' is the number of decimal digits that can be represented safely with that kind of precision.

提交回复
热议问题