On Fri, 22 Sep 2023 05:36:02 GMT, Joe Darcy <da...@openjdk.org> wrote:
> A new paper > > "Accuracy of Mathematical Functions in Single, Double, Double Extended, and > Quadruple Precision" > by Brian Gladman, Vincenzo Innocente and Paul Zimmermann > https://members.loria.fr/PZimmermann/papers/accuracy.pdf > > details the inputs with generate the worst-case observed errors in different > math library implementations. The FDLIBM-related worst cases should be added > to the test suite. test/jdk/java/lang/Math/WorstCaseTests.java line 266: > 264: > 265: // Worst-case observed error > 266: {-0x1.34e729fd08086p+21, +0x1.6a6a0d6a17f0fp-1}, Both `Math.cos` and `StrictMath.cos` produce the correctly rounded result here. I don't know why the paper says otherwise. Perhaps OpenLibm is not exactly fdlibm. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15879#discussion_r1334556250