]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: clarified doc string for SetMantExp
authorRobert Griesemer <gri@golang.org>
Sun, 22 Aug 2021 19:11:02 +0000 (12:11 -0700)
committerRobert Griesemer <gri@golang.org>
Sun, 22 Aug 2021 21:43:43 +0000 (21:43 +0000)
Fixes #47879.

Change-Id: I35efb5fc65c4f1eb1b45918f95bbe1ff4039950e
Reviewed-on: https://go-review.googlesource.com/c/go/+/344249
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/math/big/float.go

index 42050e2c39d76e2c703730ac8883b0dd2f31f715..a8c91a6e547c268371b1093ae0d57c5af2fa47a3 100644 (file)
@@ -304,7 +304,9 @@ func (z *Float) setExpAndRound(exp int64, sbit uint) {
 // SetMantExp sets z to mant × 2**exp and returns z.
 // The result z has the same precision and rounding mode
 // as mant. SetMantExp is an inverse of MantExp but does
-// not require 0.5 <= |mant| < 1.0. Specifically:
+// not require 0.5 <= |mant| < 1.0. Specifically, for a
+// given x of type *Float, SetMantExp relates to MantExp
+// as follows:
 //
 //     mant := new(Float)
 //     new(Float).SetMantExp(mant, x.MantExp(mant)).Cmp(x) == 0