You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Double.MIN_VALUE and Float.MIN_VALUE do not actually provide the minimum double or float values. Instead, they provide the smallest positive nonzero value of the given type.
This is confusing, since Integer.MIN_VALUE behaves differently, and therefore most uses of Double/Float.MIN_VALUE are probably bugs.
The text was updated successfully, but these errors were encountered:
I like the idea, but I have no idea how this could be checked statically, unless you mean just banning these things entirely. Is there evidence that 90% of the uses of those constants are wrong?
Original issue created by eaftan@google.com on 2013-10-30 at 08:50 PM
From Josh Bloch:
Double.MIN_VALUE and Float.MIN_VALUE do not actually provide the minimum double or float values. Instead, they provide the smallest positive nonzero value of the given type.
This is confusing, since Integer.MIN_VALUE behaves differently, and therefore most uses of Double/Float.MIN_VALUE are probably bugs.
The text was updated successfully, but these errors were encountered: