mirror of https://github.com/golang/go.git
math/big: add a comment for SetMantExp
Change-Id: I9ff5d1767cf70648c2251268e5e815944a7cb371 Reviewed-on: https://go-review.googlesource.com/c/go/+/233737 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
3b6c812f3d
commit
bd6dfe9a3e
|
|
@ -322,10 +322,11 @@ func (z *Float) SetMantExp(mant *Float, exp int) *Float {
|
|||
mant.validate()
|
||||
}
|
||||
z.Copy(mant)
|
||||
if z.form != finite {
|
||||
return z
|
||||
|
||||
if z.form == finite {
|
||||
// 0 < |mant| < +Inf
|
||||
z.setExpAndRound(int64(z.exp)+int64(exp), 0)
|
||||
}
|
||||
z.setExpAndRound(int64(z.exp)+int64(exp), 0)
|
||||
return z
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue