RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v44]
fabioromano1
duke at openjdk.org
Mon Oct 14 15:19:14 UTC 2024
On Mon, 14 Oct 2024 15:06:42 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Added mathematical comments for maxPowsOf5
>
> src/java.base/share/classes/java/math/BigDecimal.java line 5280:
>
>> 5278: BigInteger[] qr; // quotient-remainder pair
>> 5279: // Remove 5^(2^i) from the factors of intVal, until 5^remainingZeros < 5^(2^i)
>> 5280: // (i.e., there are too few powers of five left to remove).
>
> It's a bit unclear what's meant here with "_too few_ powers of five left to remove".
> Can we have something more explicit?
It's hard for me to think of something more explicit than the mathematical definitions already present in the comments...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21323#discussion_r1799704982
More information about the core-libs-dev
mailing list