RFR: 8334755: Asymptotically faster implementation of square root algorithm [v23]
fabioromano1
duke at openjdk.org
Sat Jul 13 19:15:53 UTC 2024
On Fri, 12 Jul 2024 14:39:51 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> The full explanation for the unnormalization is in the second paper, "A proof of GMP square root", par. 3.2 at page 11.
>
> Well, I have to compare that section, which is clear to me, with the code again.
@rgiulietti I noticed that, after this unnormalization, while the square root can't have leading zeros by construction, the remainder could have them. Although there's not a general contract of the class MutableBigInteger that imposes the results must be always normalized (in the sense of `MBI.isNormalized()`), this might be an issue if `MBI.sqrtRem()` were used to do intermediate computations with MutableBigIntegers.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1676884262
More information about the core-libs-dev
mailing list