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
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best. https://play.golang.org/p/iVPRHj3eZ9
What did you expect to see?
"Correct and exact" as output; implying that since math/big accuracy of Float.Int64() reported Exact, that I would get the same value as the same input cast to an int64.
What did you see instead?
"Not equal, despite exact" as output; implying that even though the same values went in as inputs, and math/big reported the conversion could occur w/o rounding, the values were not equal.
The text was updated successfully, but these errors were encountered:
Disregard, I see now a few issues with my example. I should have used math.MinInt64 in this particular example and that the loss of precision was occurring when originally cast into the float64 prior to the big.Float.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.1 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/iVPRHj3eZ9
What did you expect to see?
"Correct and exact" as output; implying that since math/big accuracy of Float.Int64() reported Exact, that I would get the same value as the same input cast to an int64.
What did you see instead?
"Not equal, despite exact" as output; implying that even though the same values went in as inputs, and math/big reported the conversion could occur w/o rounding, the values were not equal.
The text was updated successfully, but these errors were encountered: