On Fri, 25 Jul 2025 14:56:47 GMT, Raffaello Giulietti <rgiulie...@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 1934:
> 
>> 1932:             return new MutableBigInteger[] { this, new 
>> MutableBigInteger() };
>> 1933: 
>> 1934:         final int bitLength = (int) this.bitLength();
> 
> The method does not state that it is assuming that `bitLength()` fits in an 
> `int`.

Indeed, I did not stated it because I was not sure if it were better to assume 
that `bitLength()` fits in an `int`, or to throw an `ArithmeticException` 
instead if it doesn't...

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

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

Reply via email to