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
As a side note, you should not write x := *big.NewRat(...). Shallow copies of *big.Rat values are not supported. This will be more clearly documented in the upcoming 1.12 release (https://tip.golang.org/pkg/math/big/#Rat).
To address the main issue, you should compare *big.Rat values using the Cmp method. The package makes no promise that values that compare as equal use the same internal representation.
What version of Go are you using (
go version
)?1.11.2
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/yFKM2k6djNA
What did you expect to see?
I would expect to see both structures be identical.
What did you see instead?
While the same numerical value, they are different for the purposes of test assertion.
The text was updated successfully, but these errors were encountered: