RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v51]

fabioromano1 duke at openjdk.org
Wed May 7 17:39:21 UTC 2025


On Wed, 7 May 2025 17:32:06 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

> Ah right, but you probably want

No, the sufficient condition to get the overflow is `(bitLength() - 1L) * exponent + 1L > Integer.MAX_VALUE`, which is equivalent to that one I wrote above.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24690#discussion_r2078142049


More information about the core-libs-dev mailing list