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: new 'huge' trig tests failing on s390x #29221

Closed
mundaym opened this issue Dec 13, 2018 · 4 comments
Closed

math: new 'huge' trig tests failing on s390x #29221

mundaym opened this issue Dec 13, 2018 · 4 comments

Comments

@mundaym
Copy link
Member

mundaym commented Dec 13, 2018

Presumably the s390x assembly implementations, like the old Go implementations, weren't designed to produce the correct result for 'huge' input values.

--- FAIL: TestHugeCos (0.00s)
    all_test.go:3114: Cos(1.329227995784916e+36) = NaN, want -0.9258790228548379
    all_test.go:3114: Cos(1.7668470647783843e+72) = NaN, want 0.9360104259335379
    all_test.go:3114: Cos(3.1217485503159922e+144) = NaN, want -0.2828277764019379
    all_test.go:3114: Cos(1.8919697882131776e+69) = NaN, want -0.14616431394103618
    all_test.go:3114: Cos(2.514859209672214e+105) = NaN, want -0.7945605821067141
    all_test.go:3114: Cos(1.7976931348623157e+308) = NaN, want -0.9999876894265599
--- FAIL: TestHugeSin (0.00s)
    all_test.go:3124: Sin(1.329227995784916e+36) = NaN, want 0.377820109360752
    all_test.go:3124: Sin(1.7668470647783843e+72) = NaN, want -0.35197227524865776
    all_test.go:3124: Sin(3.1217485503159922e+144) = NaN, want 0.9591707089436872
    all_test.go:3124: Sin(1.8919697882131776e+69) = NaN, want 0.9892603263702362
    all_test.go:3124: Sin(2.514859209672214e+105) = NaN, want -0.6071848823564695
    all_test.go:3124: Sin(1.7976931348623157e+308) = NaN, want 0.00496195478918406
--- FAIL: TestHugeTan (0.00s)
    all_test.go:3144: Tan(1.329227995784916e+36) = NaN, want -0.40806638884180424
    all_test.go:3144: Tan(1.7668470647783843e+72) = NaN, want -0.37603456702698074
    all_test.go:3144: Tan(3.1217485503159922e+144) = NaN, want -3.391359650547799
    all_test.go:3144: Tan(1.8919697882131776e+69) = NaN, want -6.76813854009065
    all_test.go:3144: Tan(2.514859209672214e+105) = NaN, want 0.7641769501660493
    all_test.go:3144: Tan(1.7976931348623157e+308) = NaN, want -0.00496201587444489
FAIL
FAIL	math	0.014s
@mundaym mundaym added this to the Go1.12 milestone Dec 13, 2018
@bcmills
Copy link
Contributor

bcmills commented Dec 13, 2018

@griesemer
Copy link
Contributor

The s390x implementations are inaccurate. We either disable the tests for s390x or we switch to the non-assembly implementation.

@griesemer griesemer self-assigned this Dec 13, 2018
@griesemer
Copy link
Contributor

I'm on this.

@gopherbot
Copy link

Change https://golang.org/cl/154119 mentions this issue: math: don't run huge argument tests on s390x

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants