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: Expm1(x) returns +Inf not -1 when x < -709 #11442

Closed
ncw opened this issue Jun 28, 2015 · 3 comments
Closed

math: Expm1(x) returns +Inf not -1 when x < -709 #11442

ncw opened this issue Jun 28, 2015 · 3 comments

Comments

@ncw
Copy link
Contributor

ncw commented Jun 28, 2015

Demonstration: http://play.golang.org/p/APVWO63Dep

    for i := -1; i >= -1000; i-- {
        x := float64(i)
        fmt.Printf("expm1(%g) = %g\n", x, math.Expm1(x))
    }

Output (snipped)

expm1(-703) = -1
expm1(-704) = -1
expm1(-705) = -1
expm1(-706) = -1
expm1(-707) = -1
expm1(-708) = -1
expm1(-709) = -1
expm1(-710) = +Inf
expm1(-711) = +Inf
expm1(-712) = +Inf
expm1(-713) = +Inf
expm1(-714) = +Inf
expm1(-715) = +Inf
expm1(-716) = +Inf
expm1(-717) = +Inf
@cldorian
Copy link
Contributor

cldorian commented Jul 1, 2015

Thanks for error report; submitted fix (Change-Id: I2053fe752c6a122924d28565f1338f73e00ed417).

@gopherbot
Copy link

CL https://golang.org/cl/11791 mentions this issue.

@bradfitz
Copy link
Contributor

bradfitz commented Jul 1, 2015

/cc @rsc for triage.

@golang golang locked and limited conversation to collaborators Jul 11, 2016
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

4 participants