diff options
Diffstat (limited to 'src/pkg/math/frexp.go')
-rw-r--r-- | src/pkg/math/frexp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/math/frexp.go b/src/pkg/math/frexp.go index b63b508e6..203219c0d 100644 --- a/src/pkg/math/frexp.go +++ b/src/pkg/math/frexp.go @@ -19,9 +19,9 @@ func Frexp(f float64) (frac float64, exp int) { return f, 0 } x := Float64bits(f) - exp = int((x>>shift)&mask) - bias + exp = int((x>>shift)&mask) - bias + 1 x &^= mask << shift - x |= bias << shift + x |= (-1 + bias) << shift frac = Float64frombits(x) return } |