RFR: JDK-8316688: Widen allowable error bound of Math.hypot

Brian Burkhalter bpb at openjdk.org
Thu Sep 21 19:50:45 UTC 2023


On Thu, 21 Sep 2023 19:19:34 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> The Math.hypot method claims its error bound is one ulp.
> 
> The paper
> 
> "Accuracy of Mathematical Functions in Single, Double, Double
> Extended, and Quadruple Precision"
> Brian Gladman, Vincenzo Innocente and Paul Zimmermann
> September 21, 2023
> https://members.loria.fr/PZimmermann/papers/accuracy.pdf
> 
> lists a known worst-case error of 1.21 ulps for hypot for the "OpenLibm" math library, which is a derivative of FDLIBM.
> 
> The specification of Math.hypot should be updated to acknowledge the wider error bound. I changed the allowable error bound to 1.5 ulps is give a bit of cushion.

Approved. CSR also reviewed.

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

Marked as reviewed by bpb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15868#pullrequestreview-1638590617


More information about the core-libs-dev mailing list