On Mon, 29 Jul 2024 20:51:39 GMT, Raffaello Giulietti
wrote:
>>> The following variant should be preferred, as it has a readable figure on
>>> p. 21, whereas the same figure in the variant linked in the PR seems broken
>>> for some reason. https://inria.hal.science/inria-00072113/document
>>
On Mon, 29 Jul 2024 18:25:54 GMT, fabioromano1 wrote:
>> src/java.base/share/classes/java/math/MutableBigInteger.java line 550:
>>
>>> 548: */
>>> 549: void safeRightShift(int n) {
>>> 550: if (n >= bitLength()) {
>>
>> The commit message for this reads `More accurate condition
On Mon, 29 Jul 2024 16:48:32 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> If the input is a square, then s0 == 0, so testing for non-zero remainder
>> is redundant
>
> src/java.base/sh
On Mon, 29 Jul 2024 16:50:32 GMT, Raffaello Giulietti
wrote:
> Also, I wonder if it wouldn't be simpler for `len` to represent the `int`
> length of the square root rather than the `int` length of the argument. It
> would be more consistent with the Bertot, Magaud, Zimmermann paper and might
On Mon, 29 Jul 2024 16:50:10 GMT, Raffaello Giulietti
wrote:
> The following variant should be preferred, as it has a readable figure on p.
> 21, whereas the same figure in the variant linked in the PR seems broken for
> some reason. https://inria.hal.science/inria-00072113/document
What is t
On Mon, 29 Jul 2024 17:00:09 GMT, Raffaello Giulietti
wrote:
> Sorry, not `<<` but `*`
or `(x.intLen & 1) << 5`
-
PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1695649080
On Mon, 29 Jul 2024 16:49:04 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> If the input is a square, then s0 == 0, so testing for non-zero remainder
>> is redundant
>
> src/java.base/sh
On Mon, 29 Jul 2024 13:18:16 GMT, fabioromano1 wrote:
>> I have implemented the Zimmermann's square root algorithm, available in
>> works [here](https://inria.hal.science/inria-00072854/en/) and
>> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root).
>>
>> The
> I have implemented the Zimmermann's square root algorithm, available in works
> [here](https://inria.hal.science/inria-00072854/en/) and
> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root).
>
> The algorithm is proved to be asymptotically faster than the New