Skip to content
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

Open
bmkessler opened this issue Mar 14, 2020 · 1 comment
Open

math/cmplx: Tan incorrect on s390x for large arguments #37854

bmkessler opened this issue Mar 14, 2020 · 1 comment

Comments

@bmkessler
Copy link
Contributor

@bmkessler bmkessler commented Mar 14, 2020

s390x fails the tests for Tan with large arguments due to incorrect argument reduction in the trigonometric routines for the base math packages.

--- FAIL: TestTan (0.00s)
    cmath_test.go:839: Tan((-1.329227995784916e+36+0i)) = (NaN+NaNi), want (0.40806638884180424+0i)
    cmath_test.go:839: Tan((1.7668470647783843e+72+0i)) = (NaN+NaNi), want (-0.37603456702698074+0i)
    cmath_test.go:839: Tan((2.037035976334486e+90+0i)) = (NaN+NaNi), want (4.60901287677811+0i)
    cmath_test.go:839: Tan((-3.1217485503159922e+144+0i)) = (NaN+NaNi), want (3.391359650547799+0i)
    cmath_test.go:839: Tan((1.8919697882131776e+69+0i)) = (NaN+NaNi), want (-6.76813854009065+0i)
    cmath_test.go:839: Tan((-2.514859209672214e+105+0i)) = (NaN+NaNi), want (-0.7641769501660493+0i)

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

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 14, 2020

Change https://golang.org/cl/223457 mentions this issue: math/cmplx: disable TanHuge test on s390x

gopherbot pushed a commit that referenced this issue Mar 14, 2020
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>
@cagedmantis cagedmantis added this to the Backlog milestone Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants