We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e035a0 commit b08568dCopy full SHA for b08568d
src/math/big/rat.go
@@ -413,6 +413,8 @@ func (x *Rat) Num() *Int {
413
// Denom returns the denominator of x; it is always > 0.
414
// The result is a reference to x's denominator; it
415
// may change if a new value is assigned to x, and vice versa.
416
+// If x's denominator is 1, Denom may materialize the denominator, thereby
417
+// modifying x.
418
func (x *Rat) Denom() *Int {
419
x.b.neg = false // the result is always >= 0
420
if len(x.b.abs) == 0 {
0 commit comments