diff options
| author | Russ Cox <rsc@golang.org> | 2009-02-13 14:48:32 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-02-13 14:48:32 -0800 |
| commit | 526837026995aa88a05eb73f83f8573d5c024882 (patch) | |
| tree | a3b6c6ab9f68981976738f0efc7988353d5a0d82 /src/lib/strconv/atof.go | |
| parent | c2feca8a8dd68958c476a71b1e07b5cf43421a98 (diff) | |
| download | golang-526837026995aa88a05eb73f83f8573d5c024882.tar.gz | |
convert composite literals from { } to ( ).
only non-trivial changes are in
convlit1.go
golden.out
R=gri
OCL=25019
CL=25024
Diffstat (limited to 'src/lib/strconv/atof.go')
| -rw-r--r-- | src/lib/strconv/atof.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/strconv/atof.go b/src/lib/strconv/atof.go index 358594416..d1a0f4a9e 100644 --- a/src/lib/strconv/atof.go +++ b/src/lib/strconv/atof.go @@ -106,9 +106,9 @@ func stringToDecimal(s string) (neg bool, d *decimal, trunc bool, ok bool) { } // decimal power of ten to binary power of two. -var powtab = []int{ +var powtab = []int( 1, 3, 6, 9, 13, 16, 19, 23, 26 -} +) func decimalToFloatBits(neg bool, d *decimal, trunc bool, flt *floatInfo) (b uint64, overflow bool) { var exp int; @@ -232,14 +232,14 @@ func decimalAtof32Int(neg bool, d *decimal) float32 { } // Exact powers of 10. -var float64pow10 = []float64 { +var float64pow10 = []float64 ( 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22 -} -var float32pow10 = []float32 { +) +var float32pow10 = []float32 ( 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10 -} +) // If possible to convert decimal d to 64-bit float f exactly, // entirely in floating-point math, do so, avoiding the expense of decimalToFloatBits. |
