RFR: 8334755: Asymptotically faster implementation of square root algorithm [v23]

fabioromano1 duke at openjdk.org
Fri Jul 12 14:25:53 UTC 2024


On Fri, 12 Jul 2024 14:16:38 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> src/java.base/share/classes/java/math/MutableBigInteger.java line 2040:
>> 
>>> 2038:         sqrt.add(q);
>>> 2039: 
>>> 2040:         MutableBigInteger chunk = u;
>> 
>> I don't get the need for `chunk`. It should be possible to use `u` directly.
>> Is it for readability? Then maybe use a more "mathematical" name.
>
> Ok, but what should the name be?

Like `u_a0`? It is the most `mathematical` name that comes to my mind.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1676001072


More information about the core-libs-dev mailing list