diff options
author | Russ Cox <rsc@golang.org> | 2014-05-21 17:19:12 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-05-21 17:19:12 -0400 |
commit | 9cb4d3b07c45a015b1001cd507fd525506f7476d (patch) | |
tree | 56814f37f056efd75bf8eaea8f07a33e607528f1 /test/float_lit2.go | |
parent | 563a64b47d6f54188e2301e6b0b26dce599de2b2 (diff) | |
download | go-9cb4d3b07c45a015b1001cd507fd525506f7476d.tar.gz |
test: fix two typos in float_lit2.go
Noted by gri in CL 100660044 review but I missed them.
TBR=gri
CC=golang-codereviews
https://codereview.appspot.com/97570049
Diffstat (limited to 'test/float_lit2.go')
-rw-r--r-- | test/float_lit2.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/float_lit2.go b/test/float_lit2.go index 01b430688..96d23f38d 100644 --- a/test/float_lit2.go +++ b/test/float_lit2.go @@ -16,9 +16,9 @@ import ( // The largest exact float32 is f₁ = (1+(1-2²³))×2¹²⁷ = (1-2²⁴)×2¹²⁸ = 2¹²⁸ - 2¹⁰⁴. // The next float32 would be f₂ = (1+1)×2¹²⁷ = 1×2¹²⁸, except that exponent is out of range. // Float32 conversion rounds to the nearest float32, rounding to even mantissa: -// between f₁ and f₂, values closer to f₁ round to f₁and values closer to f₂ are rejected as out of range. +// between f₁ and f₂, values closer to f₁ round to f₁ and values closer to f₂ are rejected as out of range. // f₁ is an odd mantissa, so the halfway point (f₁+f₂)/2 rounds to f₂ and is rejected. -// The halfway point (f₁+f₂)/2 = 2¹²⁸ - 2¹⁰⁵. +// The halfway point is (f₁+f₂)/2 = 2¹²⁸ - 2¹⁰⁵. // // The same is true of float64, with different constants: s/24/53/ and s/128/1024/. |