RFR: 8077587: BigInteger Roots [v45]

fabioromano1 duke at openjdk.org
Fri Jul 25 15:16:59 UTC 2025


On Fri, 25 Jul 2025 14:56:09 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Round up to do less iterations
>>   
>>   With the 1st iteration outside the loop, it is more convenient rounding up to ceiling.
>
> src/java.base/share/classes/java/math/MutableBigInteger.java line 1929:
> 
>> 1927:      * @return the integer {@code n}th root of {@code this} and the remainder
>> 1928:      */
>> 1929:     MutableBigInteger[] nthRootRem(final int n) {
> 
> We rarely use `final` on a parameter.

In this case, `final` serves to indicate that the value of `n` is never modified by the method.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24898#discussion_r2231390118


More information about the core-libs-dev mailing list