RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v44]

fabioromano1 duke at openjdk.org
Thu Oct 17 23:25:13 UTC 2024


On Thu, 17 Oct 2024 15:19:52 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> Will approve at the beginning of next week to let you add some last minute (not substantial) changes during the next few days.
>
>> In any reduction approach, you still need to prove that the reduced problem is equivalent to the original. This is to say that the running variables (in code and proof) must somehow be related to the initial values.
> 
> Yes, although in the proof by "reducing the size of the problem" this should be evident by induction...

> Will approve at the beginning of next week to let you add some last minute (not substantial) changes during the next few days.

I thought that maybe could be useful add a comment highlighting that `(intVal * 2^powsOf2) / 10^z` and `scale - z` are invariant values, to point out the substructure of the problem better...

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21323#discussion_r1805580561


More information about the core-libs-dev mailing list