biggest integer that can be stored in a double

前端 未结 7 2247
清歌不尽
清歌不尽 2020-11-22 01:09

What is the biggest \"no-floating\" integer that can be stored in an IEEE 754 double type without losing precision ?

7条回答
  •  感动是毒
    2020-11-22 01:30

    Wikipedia has this to say in the same context with a link to IEEE 754:

    On a typical computer system, a 'double precision' (64-bit) binary floating-point number has a coefficient of 53 bits (one of which is implied), an exponent of 11 bits, and one sign bit.

    2^53 is just over 9 * 10^15.

提交回复
热议问题