FYI, planned update of floating-point terminology in JLS and JVMS to IEEE 754-2019

Joe Darcy joe.darcy at oracle.com
Wed Apr 22 18:35:09 UTC 2020


Hello,

The Java Language Specification (JLS) and Java Virtual Machine 
Specification (JVMS) use terminology from and make reference to the 1985 
release of the IEEE 754 floating-point standard. The IEEE 754 standard 
from 1985 has been superseded, most recently by a release from 2019. The 
new release has changed the terminology used for various floating-point 
concepts referred to by JLS and JVMS. To accommodate this, we're 
planning to update the floating-point terminology used in the Java SE 15 
editions of JLS and JVMS:

     JDK-7074799: Adopt IEEE 754-2019 terminology in JLS
     https://bugs.openjdk.java.net/browse/JDK-7074799
http://cr.openjdk.java.net/~darcy/Ieee754TerminologyUpdate/2020-04-21/specs/float-terminology-jls.html

     JDK-8240327: Adopt IEEE 754-2019 terminology in JVMS
     https://bugs.openjdk.java.net/browse/JDK-8240327
http://cr.openjdk.java.net/~darcy/Ieee754TerminologyUpdate/2020-04-21/specs/float-terminology-jvms.html

The operational semantics of floating-point in JLS and JVMS is *not* 
altered by this spec update. The floating-point operations, +, -, *, /, 
etc. are specified to produce the same results for the same inputs as 
before and the sets of possible inputs are unchanged.

The terminology updates in IEEE 754 include:
* "IEEE 754 Standard for Binary Floating-Point Arithmetic" to
     "IEEE 754 Standard for Floating-Point Arithmetic" (2019 standard 
covers binary and decimal arithmetic)
* single format -> binary32 format
* double format -> binary64 format
* denormalized value -> subnormal value
* round to nearest rounding mode -> roundTiesToEven rounding-direction 
attribute
* round towards zero rounding mode -> roundTowardZero rounding-direction 
attribute

Informative notes about the changes to rounding mode / 
rounding-direction attribution naming in IEEE 754 have been added to the 
java.math.RoundingMode enum in JDK 15:

     JDK-8240624: Note mapping of RoundingMode constants to equivalent 
IEEE 754-2019 attribute
     https://hg.openjdk.java.net/jdk/jdk/rev/5a58d0939974

Updates to java.lang.{Math, StrictMath} are possible too under

         JDK-8240632: Note differences between IEEE 754-2019 math lib 
special cases and java.lang.Math

Few, if any, behavior changes are expected as part of JDK-8240632.

Thanks to Alex for detailed reviews of earlier iterations of the JLS and 
JVMS spec changes.

Cheers,

-Joe



More information about the jdk-dev mailing list