mirror of
https://github.com/golang/go
synced 2024-11-02 11:50:30 +00: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:
parent
6416bde023
commit
19585826fa
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue