1
0
mirror of https://github.com/golang/go synced 2024-11-22 16:25:07 -07:00

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>
This commit is contained in:
Robert Griesemer 2021-08-22 12:11:02 -07:00
parent 6416bde023
commit 19585826fa

View 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