JDK-8316688 : Widen allowable error bound of Math.hypot
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-09-21
  • Updated: 2024-10-27
  • Resolved: 2023-09-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b17Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
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.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/15868 Date: 2023-09-21 19:19:34 +0000
27-10-2024

Changeset: b66ded9a Author: Joe Darcy <darcy@openjdk.org> Date: 2023-09-22 16:35:55 +0000 URL: https://git.openjdk.org/jdk/commit/b66ded9a5b699e4936db25b58944587432e64f46
22-09-2023