[aarch64-port-dev ] 8210461: AArch64: Math.cos intrinsic gives incorrect results
Andrew Haley
aph at redhat.com
Thu Sep 6 13:18:22 UTC 2018
Please confirm this bug:
Range reduction for trig functions on AArch64 is broken. The smallest
broken case is
Math.cos(1647100)
which should return 0.7833030468809974 but returns
-0.2745634094819721.
The problem is that __kernel_rem_pio2 is supposed to reduce its
argument to the range [-pi/4, pi/4], pi/4 ~ 0.785398164 but it does
not: it returns 1.8489319595787654, which is outside the range of the
polynomial cosine approximation.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list