aboutsummaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorBrian Kessler <brian.m.kessler@gmail.com>2018-12-13 09:19:11 -0700
committerRobert Griesemer <gri@golang.org>2018-12-13 20:35:45 +0000
commit02ad841dd82bd644b12efa168ad9fc4c623d6b37 (patch)
tree0fea9468edf250bf37b706e420b97c1775e43e48 /src/math
parentd177e10d2268d92e1babbbdf98fa992cb55bcff4 (diff)
downloadgo-02ad841dd82bd644b12efa168ad9fc4c623d6b37.tar.xz
math: correct mPi4 comment
The previous comment mis-stated the number of bits in mPi4. The correct value is 19*64 + 1 == 1217 bits. Change-Id: Ife971ff6936ce2d5b81ce663ce48044749d592a0 Reviewed-on: https://go-review.googlesource.com/c/154017 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/math')
-rw-r--r--src/math/trig_reduce.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/trig_reduce.go b/src/math/trig_reduce.go
index 7bc72e986d..6f8eaba9b9 100644
--- a/src/math/trig_reduce.go
+++ b/src/math/trig_reduce.go
@@ -68,8 +68,8 @@ func trigReduce(x float64) (j uint64, z float64) {
// mPi4 is the binary digits of 4/pi as a uint64 array,
// that is, 4/pi = Sum mPi4[i]*2^(-64*i)
-// 19 64-bit digits gives 1153 bits of precision to handle
-// the largest possible float64 exponent.
+// 19 64-bit digits and the leading one bit give 1217 bits
+// of precision to handle the largest possible float64 exponent.
var mPi4 = [...]uint64{
0x0000000000000001,
0x45f306dc9c882a53,