-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
math/cmplx: Tan incorrect on s390x for large arguments #37854
Comments
Change https://golang.org/cl/223457 mentions this issue: |
s390x has inaccurate range reduction for the assembly routines in math so these tests are diabled until these are corrected. Updates #37854 Change-Id: I1e26acd6d09ae3e592a3dd90aec73a6844f5c6fe Reviewed-on: https://go-review.googlesource.com/c/go/+/223457 Run-TryBot: Brian Kessler <brian.m.kessler@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Found a fix and made code changes. Tested the fix and made sure that its working fine. I will raise my code changes for review in Gerrit... |
CC @golang/s390x |
I have raised a CL to fix this issue and its under review. Please note that my fix has been tested and its working fine. Please find the link below: Benchmark details of Tan function with table driven inputs are as below:
From the above table, please note that the time taken for all the inputs beyond "2^51" till "2^400" is just around "2ns" (as shown in the first column) with the existing code, because the Tan function was only returning a "NaN" value as soon as the control enters it. No logic was getting executed and hence no time was spent in the function. |
Change https://go.dev/cl/470595 mentions this issue: |
s390x fails the tests for Tan with large arguments due to incorrect argument reduction in the trigonometric routines for the base math packages.
This is due to the fix for #31566, but the underlying issue has been present since #6794 was fixed. The temporary solution after that change was to just disable the tests for s390x.
I think the s390x assembly implementations need to be fixed or they should just revert to the pure go versions for large arguments.
@griesemer @mundaym
The text was updated successfully, but these errors were encountered: