math/big: make Rat.Denom() always return a reference
The documentation says so, but in the case of a normalized integral Rat, the denominator was a new value. Changed the internal representation to use an Int to represent the denominator (with the sign ignored), so a reference to it can always be returned. Clarified documentation and added test cases. Fixes #3521. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6237045
Showing
Please
register
or
sign in
to comment