Apologies if this has been discussed before.
The explanation for the exception for negative n ("This would cause
the operation to yield a non-integer value.") feels wrong to me. I think
the definition of the result as: x.signum() * floor(abs(nthRoot(x, n)))
works fine for that case, if nthRoot(x,-
> This PR implements nth root computation for BigIntegers using Newton method.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Optimize the computation of the input's shift
Optimize the computation of the input's shift, in order
On Thu, 24 Apr 2025 20:18:42 GMT, fabioromano1 wrote:
>> @fabioromano1 I just had a cursory glance at this PR.
>>
>> AFAIU, there are two main contributions here:
>>
>> - Performance enhancements in `pow()`, which is of general interest and does
>> not require submitting a [CSR](https://wiki.o
On Thu, 24 Apr 2025 18:17:38 GMT, Raffaello Giulietti
wrote:
> * Performance enhancements in `pow()`, which is of general interest and does
> not require submitting a [CSR](https://wiki.openjdk.org/display/csr/Main).
@rgiulietti Yes, but here, the primary enhancement in `pow()` is not concerne
On Mon, 21 Apr 2025 11:47:30 GMT, fabioromano1 wrote:
>>> [Here is a proof of convergence of the recurrence
>>> used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf)
>>
>> That's very nice. It would be even nicer if this was a permalink into the
>> JDK r
On Mon, 21 Apr 2025 10:14:05 GMT, Andrew Haley wrote:
> That's very nice. It would be even nicer if this was a permalink into the JDK
> repo, and a reference in the source code.
@theRealAph Ok. It would be useful to have a link to an explanation on how this
can be done, if there is one. Thanks
On Mon, 21 Apr 2025 10:05:21 GMT, Andrew Haley wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Code simplification
>
> src/java.base/share/classes/java/math/MutableBigInteger.java line 1924:
>
>> 1922: * @imp
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote:
>> 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
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote:
>> 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
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote:
>> 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
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote:
>> 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
> 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 updat
12 matches
Mail list logo