aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/strconv/atof.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/strconv/atof.go')
-rw-r--r--libgo/go/strconv/atof.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/libgo/go/strconv/atof.go b/libgo/go/strconv/atof.go
index 4a4b1b4..06dae85 100644
--- a/libgo/go/strconv/atof.go
+++ b/libgo/go/strconv/atof.go
@@ -12,10 +12,7 @@ package strconv
// 2) Multiply/divide decimal by powers of two until in range [0.5, 1)
// 3) Multiply by 2^precision and round to get mantissa.
-import (
- "math"
- "os"
-)
+import "math"
var optimize = true // can change for testing
@@ -355,7 +352,7 @@ func (d *decimal) atof32() (f float32, ok bool) {
// If s is syntactically well-formed but is more than 1/2 ULP
// away from the largest floating point number of the given size,
// Atof32 returns f = ±Inf, err.Error = ErrRange.
-func Atof32(s string) (f float32, err os.Error) {
+func Atof32(s string) (f float32, err error) {
if val, ok := special(s); ok {
return float32(val), nil
}
@@ -380,7 +377,7 @@ func Atof32(s string) (f float32, err os.Error) {
// Atof64 converts the string s to a 64-bit floating-point number.
// Except for the type of its result, its definition is the same as that
// of Atof32.
-func Atof64(s string) (f float64, err os.Error) {
+func Atof64(s string) (f float64, err error) {
if val, ok := special(s); ok {
return val, nil
}
@@ -405,7 +402,7 @@ func Atof64(s string) (f float64, err os.Error) {
// AtofN converts the string s to a 64-bit floating-point number,
// but it rounds the result assuming that it will be stored in a value
// of n bits (32 or 64).
-func AtofN(s string, n int) (f float64, err os.Error) {
+func AtofN(s string, n int) (f float64, err error) {
if n == 32 {
f1, err1 := Atof32(s)
return float64(f1), err1