StrictMath is intended to provide reproducible cross-platform and cross-release behavior for the math library. Given the technology available at the time, this goal was accomplished by requiring the FDLIBM algorithms be used.
In the decades since Java was introduced, the state of the art and practice of math libraries has evolved. Another way to accomplish cross-platform and cross-release behavior would be to require a _correctly rounded_ implementation.
A correctly rounded approximation is the best a floating-point approximation can be and is the analagous behavior to the built-in arithmetic operators. As a correctly rounded approximation is a semantic rather than operational definition, having the specification require correct rounding allows clean-room, independent, and separate-developed implementations.
A transition path from FDLIBM to correctly rounding could like the following:
1) Change specification to allow either FDLIBM or correct rounding, under the control of a new Java SE system property, with a default of FDLIBM.
2) In a subsequent release, change the default from FDLIBM to correct rounding.
3) After some number of release, remove the system property and only allow correct rounding.
In the decades since Java was introduced, the state of the art and practice of math libraries has evolved. Another way to accomplish cross-platform and cross-release behavior would be to require a _correctly rounded_ implementation.
A correctly rounded approximation is the best a floating-point approximation can be and is the analagous behavior to the built-in arithmetic operators. As a correctly rounded approximation is a semantic rather than operational definition, having the specification require correct rounding allows clean-room, independent, and separate-developed implementations.
A transition path from FDLIBM to correctly rounding could like the following:
1) Change specification to allow either FDLIBM or correct rounding, under the control of a new Java SE system property, with a default of FDLIBM.
2) In a subsequent release, change the default from FDLIBM to correct rounding.
3) After some number of release, remove the system property and only allow correct rounding.
- relates to
-
JDK-8134780 Port fdlibm to Java, part 1
-
- Resolved
-
-
JDK-8171407 Port fdlibm to Java, part 2
-
- Closed
-