diff options
author | Robert Griesemer <gri@golang.org> | 2021-08-22 12:11:02 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-08-22 21:43:43 +0000 |
commit | 19585826fa52d0580724be91f610db54727c74f0 (patch) | |
tree | 80b57a73c9351a855ad9f92051ed2ae764cb3ce9 /src | |
parent | 6416bde023d897dcedc6d53bf0bf58821962f435 (diff) | |
download | go-19585826fa52d0580724be91f610db54727c74f0.tar.gz go-19585826fa52d0580724be91f610db54727c74f0.zip |
math/big: clarified doc string for SetMantExp
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/math/big/float.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/math/big/float.go b/src/math/big/float.go index 42050e2c39..a8c91a6e54 100644 --- a/src/math/big/float.go +++ b/src/math/big/float.go @@ -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 |