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.

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

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

Changes: https://git.openjdk.org/jdk/pull/15868/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15868&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8316688
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/15868.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15868/head:pull/15868

PR: https://git.openjdk.org/jdk/pull/15868

Reply via email to