The accuracy of a double in general programming and Java

后端 未结 2 1737
独厮守ぢ
独厮守ぢ 2020-12-11 08:47

I understand that due to the nature of a float/double one should not use them for precision important calculations. However, i\'m a little confused on their limitations due

2条回答
  •  无人及你
    2020-12-11 09:29

    I suggest you read this page:
    https://en.wikipedia.org/wiki/Double-precision_floating-point_format

    Once you've read and understood it, and perhaps converted several examples to their binary representations in the 64 bit floating point format, then you'll have a much better idea of what significant digits a Double can hold.

提交回复
热议问题