mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
math/big: build Float.Format on top of Float.Append
Change-Id: I444eec24467f827caa5c88a1c5ae5bce92508b98 Reviewed-on: https://go-review.googlesource.com/3750 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
2e5b065ac2
commit
4c91c0d07b
3 changed files with 39 additions and 38 deletions
|
|
@ -176,7 +176,7 @@ func (x *Float) validate() {
|
|||
const msb = 1 << (_W - 1)
|
||||
m := len(x.mant)
|
||||
if x.mant[m-1]&msb == 0 {
|
||||
panic(fmt.Sprintf("msb not set in last word %#x of %s", x.mant[m-1], x.pstring()))
|
||||
panic(fmt.Sprintf("msb not set in last word %#x of %s", x.mant[m-1], x.Format('p', 0)))
|
||||
}
|
||||
if x.prec <= 0 {
|
||||
panic(fmt.Sprintf("invalid precision %d", x.prec))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue