Maximum value for Float in Java?

前端 未结 5 619
一整个雨季
一整个雨季 2021-02-05 02:54

The following question indicates that the minimum value of a Double is -Double.MAX_VALUE. Is this also true for Float (i.e., -Float.MAX_VALUE)?

5条回答
  •  野性不改
    2021-02-05 03:26

    Yes it is, and for exactly the same reason as stated in the answer for the question you linked, Floats and Doubles use IEEE754 representation which is "symmetrical" due to the way they are stored.

提交回复
热议问题