On Mon, 27 Nov 2023 22:52:36 GMT, fabioromano1 <d...@openjdk.org> wrote:
>> src/java.base/share/classes/java/math/BigInteger.java line 754: >> >>> 752: // numInts >= 1, since numBits > 0 >>> 753: >>> 754: int firstInt = rnd.nextInt() & (-1 >>> -numBits); // Mask out >>> any excess bits >> >> Instead of `numBits`, shouldn't this use something like `excessBits` similar >> to line 760 in the old version? > > It's equivalent. If you watch the implementations of other methods in the > class where a mask out is made, this method is often used. Indeed it looks as if that is correct. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16817#discussion_r1406956445