Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
http://en.wikipedia.org/wiki/Double-precision_floating-point_format说 double 可以处理数字右侧的 16 位精度,digits10 显示这个数字吗?
std::numeric_limits<T>::digit10是将具有十进制值的字符串转换为字符串并再次转换回字符串时可以返回的小数位数T。计数从最重要的非零数字开始,与小数点所在的位置无关(当然,只要您不与 的范围限制冲突T)。也就是说,前导零和尾随零无关紧要。
std::numeric_limits<T>::digit10
T
实际上它只是有意义的数字的数量。观点。您可以拥有12345678901234.5或0.0000123456789012345。
12345678901234.5
0.0000123456789012345