[aarch64-port-dev ] RFR(S): 8210461 - AArch64: Math.cos intrinsic gives incorrect results
Andrew Haley
aph at redhat.com
Fri Sep 7 15:26:36 UTC 2018
On 09/07/2018 03:03 PM, Dmitrij Pochepko wrote:
> I remember debugging this branch while running JCK tests.
>
> Haven't checked precisely, but probably fw was 0 on those cases, so, z
> - two24B*fw and z + tmp24B*fw. It would explain such behavior.
I see.
I wrote some simple code to stress test argument reduction, and it
immediately failed. The range reduction code is so horribly
complicated that the *first thing* to have done should have been to
stress test it, and evidently that was not done.
The code, as it stands, is so complicated and tangled that it is
almost impossible for anybody to debug and analyse. Its documentation
is inadequate, for the same reasons that Andrew Dinn explained with
respect to pow(). I can't have any confidence that there aren't more
lurking bugs, and this method is too important to risk breakage. It
needs some major reworking. In hindsight, I should not have accepted
it.
It's too late to get this fixed in the JDK 11 release, so it's going
to go out broken on AArch64. I'll disable the intrinsic in JDK devel
and tell the distro packagers to do patch their packages. Then we can
rewrite this intrinsic with a view of fixing its maintainability and
documentation, and perhaps including it in JDK 12.
--
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