You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// NOTE(vadim): must convert exps to int64 before - to prevent overflow
diff := abs64(int64(exp) - int64(d.exp))
// NEW TEST, avoids unnecessary rescaling
if diff == 0 {
return d
}
// END
value := new(big.Int).Set(d.value)
expScale := new(big.Int).Exp(tenInt, big.NewInt(int64(diff)), nil)
The text was updated successfully, but these errors were encountered:
see issue #128:
fix for decimal.go/rescale()
The text was updated successfully, but these errors were encountered: