You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug. 0.35 is not exactly representable as a floating point number, so there will be rounding error. If that error is downwards, then taking the floor gets you the integer almost 1 lower than the product.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/jk8bVwTo3HQ
What did you expect to see?
A correct floor results.
What did you see instead?
When I tried to get the floor of 680.0*0.35, I got 237 instead of 238.
The text was updated successfully, but these errors were encountered: