-
Notifications
You must be signed in to change notification settings - Fork 954
Math.Pow does not output correct value #3482
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
Comments
Ugh. Floats. I'll try to take a look. Might not be a good solution though. |
I wonder if whatever caused #3390 is also responsible for the change in behaviour here. |
Looking at 9e8739b for causing a change. |
Is this actually a bug? After all, |
One step further: this is not package main
import (
"fmt"
"math"
)
func main() {
fmt.Printf("%v\n", math.Exp(1.6094379124341003))
} Output is similar: 5 vs 4.999999999999999. |
The |
It appears that LLVM itself also thinks that |
@sago35 Can you point to the line in the |
Arguably this should be |
Yes, this place is causing problems. @dgryski |
Interestingly, glibc outputs 5 (on linux/arm64). Also, the two browsers I tested (Firefox, Chromium) output 5 for Update: tested Alpine Linux (aarch64) and it agrees with TinyGo. |
When I patch the vorbis package to add a small epsilon before truncation (and print if any mismatch), the tests pass.
I think this is a bug upstream in the vorbis code. |
Uh oh!
There was an error while loading. Please reload this page.
Go and TinyGo0.25 are the correct values.
TinyGo0.26 and TinyGo0.27 have a slight difference.
At least this difference is causing the problem in #3454.
The text was updated successfully, but these errors were encountered: