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
What steps will reproduce the problem?
1.
package main
import ("big"; "fmt")
func main() {
x := big.NewRat(2,1)
fmt.Println(x.Quo(big.NewRat(3,1), x))
}
2. 6g; 6l; 6.out
What is the expected output? What do you see instead?
expected: 3/2
instead: 1
What is your $GOOS? $GOARCH?
linux amd64
Which revision are you using? (hg identify)
d745d21ef536 tip
Please provide any additional information below.
arguments the other way, x.Quo(x, big.NewRat(3,1)), gives correct answer of
2/3
The text was updated successfully, but these errors were encountered:
adg's reproduction case is a little misleading. The x.Quo(y, x) actually modifies x,
so the x.Quo(x, y) isn't the symmetric operation it looks to be.
There is a bug, though. I think it's an aliasing problem. I'll a more thorough look
at it a little later today.
by soniakeys:
The text was updated successfully, but these errors were encountered: