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
I understand the result of the program, as float64 can't represent 1.2 exactly.
If this is the case, the document should be changed; either mention the actual result with explaination, or select value that float64 can represent exactly.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go1.7
What operating system and processor architecture are you using (
go env
)?windows/amd64
What did you do?
https://play.golang.org/p/kkiH1mxD7F
What did you expect to see?
6/5
The document https://golang.org/pkg/math/big says this:
z2 := new(Rat).SetFloat64(1.2) // z2 := 6/5
What did you see instead?
5404319552844595/4503599627370496
I understand the result of the program, as float64 can't represent
1.2
exactly.If this is the case, the document should be changed; either mention the actual result with explaination, or select value that float64 can represent exactly.
The text was updated successfully, but these errors were encountered: