Max value can stored in Java float with two digit precision (2 digit accuracy)?

前端 未结 4 938
情深已故
情深已故 2021-01-27 17:55

How I could find max two decimal precision vale that can be stored in float ?

From my understanding, In 32 bit float we have 24(23+1) for storing the number excluding ex

4条回答
  •  清歌不尽
    2021-01-27 18:34

    Information on the IEEE 754 single precision binary floating-point format can be found on wikipedia

    I think there is no possibility to find such a number. You are talking about a number with two decimal digits in base 10, however you want to store this number as binary value.

    While you are perfectly able to store the exact value of 1.00 in a 32-bit-float you won't be able to store 0.99.

提交回复
热议问题