RFR: JDK-8283143: Use minimal-length literals to initialize PI and E constants
Joe Darcy
darcy at openjdk.java.net
Tue Mar 15 01:43:06 UTC 2022
Depending on the range of the number line, a double value has between 15 and 17 digits of decimal precision. The literals used to initialize Math.PI and Math.E have several digits more precision than that maximum.
That is potentially confusing to readers of the code and the minimum length strings to exactly represent the value in question should be used instead.
-------------
Commit messages:
- JDK-8283143: Use minimal-length literals to initialize PI and E constants
Changes: https://git.openjdk.java.net/jdk/pull/7814/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7814&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8283143
Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/7814.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7814/head:pull/7814
PR: https://git.openjdk.java.net/jdk/pull/7814
More information about the core-libs-dev
mailing list