RFR: 8077587: BigInteger Roots [v29]

fabioromano1 duke at openjdk.org
Thu Apr 24 10:34:13 UTC 2025


> This PR implements nth root computation for `BigInteger`s using Newton method and optimizes `BigInteger.pow(int)` method.
> [Here is a proof of convergence of the recurrence used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf)

fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:

  Optimized repeated squaring trick using cache for powers

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24690/files
  - new: https://git.openjdk.org/jdk/pull/24690/files/f20d19be..8676af7c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24690&range=28
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24690&range=27-28

  Stats: 45 lines in 1 file changed: 18 ins; 0 del; 27 mod
  Patch: https://git.openjdk.org/jdk/pull/24690.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24690/head:pull/24690

PR: https://git.openjdk.org/jdk/pull/24690


More information about the core-libs-dev mailing list