math/big: fix silly bug in Int64 accessor

Change-Id: If335d45ea1ab6c8aeeb47515f97680e2c1d651f3
Reviewed-on: https://go-review.googlesource.com/7522
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Robert Griesemer 2015-03-13 12:59:56 -07:00
parent 3eb84c8908
commit f6580319e4
2 changed files with 3 additions and 1 deletions

View file

@ -835,7 +835,7 @@ func (x *Float) Int64() (int64, Accuracy) {
if x.neg {
i = -i
}
if x.MinPrec() <= 63 {
if x.MinPrec() <= uint(x.exp) {
return i, Exact
}
return i, acc // x truncated