|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
While trying to run unit tests of Apache POI with JDK 19 and 20 eary access builds, we found a small difference in handling of very small "double" numbers.
This may be intentional, but I could not find any mentioning in the release notes of changes in this area.
How to reproduce:
The following unit-test works in JDKs up to 18, but fails in latest JDK 19 and JDK 20 early access builds.
Reproducing code-snippet:
assertEquals("1.0E-323",
Double.toString(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d));
Failure:
org.opentest4j.AssertionFailedError:
Expected :1.0E-323
Actual :9.9E-324
|