<i18n dev> RFR: 8369050: DecimalFormat Rounding Errors for Fractional Ties Near Zero [v2]
Justin Lu
jlu at openjdk.org
Wed Oct 8 18:10:31 UTC 2025
> Please review this PR which corrects a rounding error for DecimalFormat on tie cases when the maximum fraction digits allowed is one less than the position of the first significant digit in the double rounded. For example, rounding a value such as 0.0005 to a maximum of 3 fractional digits. In order to get the correct `count` value, we must strip the trailing zeros prior to the check to ensure we have the correct value of `count` = 1 so that we can go down the _Rounding position is the last index_ case which properly checks if the String double was already rounded or is exact from its true decimal form.
Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
Naoto's review -> test file rename
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27681/files
- new: https://git.openjdk.org/jdk/pull/27681/files/6d22124e..1ebf7b0e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27681&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27681&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/27681.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27681/head:pull/27681
PR: https://git.openjdk.org/jdk/pull/27681
More information about the i18n-dev
mailing list