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: Ldexp doesn't handle denormals correctly #23407
Labels
Milestone
Comments
Change https://golang.org/cl/87338 mentions this issue: |
ALTree
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
Mar 11, 2018
dmitshur
added a commit
to gopherjs/gopherjs
that referenced
this issue
Jun 29, 2018
In Go 1.11, there has been an improvement made to Ldexp for some extreme values. The previous Math.pow-using algorithm doesn't produce correct results. Use the Go implementation of ldexp for those values. Continue to use the current Math.pow approach for other inputs because it's much faster: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 2000000000 0.44 ns/op Compared to using the Go implementation for all inputs, without the Math.pow fast path: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 5000000 203 ns/op Follows golang/go@4b265fb. Updates golang/go#23407.
dmitshur
added a commit
to gopherjs/gopherjs
that referenced
this issue
Jun 29, 2018
In Go 1.11, there has been an improvement made to Ldexp for some extreme values. The previous Math.pow-using algorithm doesn't produce correct results. Use the Go implementation of ldexp for those values. Continue to use the current Math.pow approach for other inputs because it's much faster: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 2000000000 0.44 ns/op Compared to using the Go implementation for all inputs, without the Math.pow fast path: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 5000000 203 ns/op Follows golang/go@4b265fb. Updates golang/go#23407.
dmitshur
added a commit
to gopherjs/gopherjs
that referenced
this issue
Jun 29, 2018
In Go 1.11, there has been an improvement made to Ldexp for some extreme values. The previous Math.pow-using algorithm doesn't produce correct results. Use the Go implementation of ldexp for those values. Continue to use the current Math.pow approach for other inputs because it's much faster: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 2000000000 0.44 ns/op Compared to using the Go implementation for all inputs, without the Math.pow fast path: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 5000000 203 ns/op Follows golang/go@4b265fb. Updates golang/go#23407.
dmitshur
added a commit
to gopherjs/gopherjs
that referenced
this issue
Aug 21, 2018
In Go 1.11, there has been an improvement made to Ldexp for some extreme values. The previous Math.pow-using algorithm doesn't produce correct results. Use the Go implementation of ldexp for those values. Continue to use the current Math.pow approach for other inputs because it's much faster: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 2000000000 0.44 ns/op Compared to using the Go implementation for all inputs, without the Math.pow fast path: $ gopherjs test -v --run=none --bench=Ldexp math BenchmarkLdexp 5000000 203 ns/op Follows golang/go@4b265fb. Updates golang/go#23407.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
What version of Go are you using (
go version
)?1.9.2 and tip
Does this issue reproduce with the latest release?
Yes
What did you do?
https://play.golang.org/p/3OfmZgFcjRR
What did you expect to see?
What did you see instead?
The result of
ldexp_386.s
is correct.This issue is that the function
ldexp
written in Go doesn't handle denormals correctly.The text was updated successfully, but these errors were encountered: