RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double

Raffaello Giulietti duke at openjdk.java.net
Fri Apr 22 14:33:56 UTC 2022


On Fri, 22 Apr 2022 14:26:07 GMT, Raffaello Giulietti <duke at openjdk.java.net> wrote:

> Add useful constants specified in IEEE 754.

The precision of float resp. double values, as defined by IEEE 754, is not easily derivable from the constants in the java.lang.Float resp. java.lang.Double classes. These values (24 resp. 53) are used in some places in the OpenJDK code base, where they appear as literals or even as derived literals, like 23 and 52. Hence, usages of these values are harder to find than necessary.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8362


More information about the core-libs-dev mailing list