aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/math/bits.go
diff options
context:
space:
mode:
authorEoghan Sherry <ejsherry@gmail.com>2010-12-15 13:20:52 -0500
committerRuss Cox <rsc@golang.org>2010-12-15 13:20:52 -0500
commit976e45726caf41246549173f87c7f0ded148d31c (patch)
tree43f0ce63e6c2847d5597e2bfad90ff072984a53f /src/pkg/math/bits.go
parenteedf5c452974fc518bd6ec385730b61f016ddadf (diff)
downloadgo-976e45726caf41246549173f87c7f0ded148d31c.tar.xz
math: change float64 bias constant from 1022 to 1023
This makes some subtle code easier to understand. R=rsc CC=golang-dev https://golang.org/cl/3444043
Diffstat (limited to 'src/pkg/math/bits.go')
-rw-r--r--src/pkg/math/bits.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/math/bits.go b/src/pkg/math/bits.go
index d36cd18d76..1a97e76799 100644
--- a/src/pkg/math/bits.go
+++ b/src/pkg/math/bits.go
@@ -10,7 +10,7 @@ const (
uvneginf = 0xFFF0000000000000
mask = 0x7FF
shift = 64 - 11 - 1
- bias = 1022
+ bias = 1023
)
// Inf returns positive infinity if sign >= 0, negative infinity if sign < 0.