RFR: 8334755: Asymptotically faster implementation of square root algorithm [v28]

fabioromano1 duke at openjdk.org
Wed Jul 17 14:13:55 UTC 2024


On Wed, 17 Jul 2024 13:57:20 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> I hope these errors are not due to an implementation change in the virtual machine instructions...
>
> There are no counterexamples for perfect squares if you write `long s = (long) Math.rint(Math.sqrt(x >= 0 ? x : x + 0x1p64));`.

@rgiulietti Is it normal that the same code did not find counterexamples until recently, and now it finds them?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1681131458


More information about the core-libs-dev mailing list