When dealing with floating-point numbers, at times it is helpful and necessary to manipulate the sign, significand, and exponent fields.This is eased by having bit masks and other related constants to isolate the fields.
Such constants are available in the JDK-internal FloatConsts and DoubleConsts classes, but are not part of the public API. Code review ofJDK-8149896 included a request to add such a public API (http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-February/038886.html).
Such constants are available in the JDK-internal FloatConsts and DoubleConsts classes, but are not part of the public API. Code review of
- relates to
-
JDK-8285477 Add a PRECISION public static field to j.l.Float and j.l.Double
-
- Resolved
-
-
JDK-8286810 Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts
-
- Resolved
-
-
JDK-8154433 Add Math.toLongExact(double) and Math.toDoubleExact(long)
-
- Closed
-
-
JDK-8149896 Removed unnecessary values in FloatConsts and DoubleConsts
-
- Resolved
-