mirror of
https://github.com/golang/go
synced 2024-10-14 03:43:28 +00:00
strconv: remove redundant type conversion
Change-Id: I25c8e8b701d6489f360fea30d09090826276b950
GitHub-Last-Rev: c2c8319dd5
GitHub-Pull-Request: golang/go#54924
Reviewed-on: https://go-review.googlesource.com/c/go/+/428976
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
parent
3585e9be67
commit
3c33c3b327
|
@ -33,7 +33,7 @@ func ryuFtoaFixed32(d *decimalSlice, mant uint32, exp int, prec int) {
|
|||
e2 := exp
|
||||
if b := bits.Len32(mant); b < 25 {
|
||||
mant <<= uint(25 - b)
|
||||
e2 += int(b) - 25
|
||||
e2 += b - 25
|
||||
}
|
||||
// Choose an exponent such that rounded mant*(2^e2)*(10^q) has
|
||||
// at least prec decimal digits, i.e
|
||||
|
@ -100,7 +100,7 @@ func ryuFtoaFixed64(d *decimalSlice, mant uint64, exp int, prec int) {
|
|||
e2 := exp
|
||||
if b := bits.Len64(mant); b < 55 {
|
||||
mant = mant << uint(55-b)
|
||||
e2 += int(b) - 55
|
||||
e2 += b - 55
|
||||
}
|
||||
// Choose an exponent such that rounded mant*(2^e2)*(10^q) has
|
||||
// at least prec decimal digits, i.e
|
||||
|
@ -194,7 +194,7 @@ func formatDecimal(d *decimalSlice, m uint64, trunc bool, roundUp bool, prec int
|
|||
}
|
||||
// render digits (similar to formatBits)
|
||||
n := uint(prec)
|
||||
d.nd = int(prec)
|
||||
d.nd = prec
|
||||
v := m
|
||||
for v >= 100 {
|
||||
var v1, v2 uint64
|
||||
|
|
Loading…
Reference in a new issue