Range reduction for trig functions on AArch64 is broken. The smallest 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.
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.
- relates to
-
JDK-8211105 AArch64: Disable cos/sin and log intrinsics in jdk11u pending fix
-
- Resolved
-