Index: src/pkg/strconv/fp_test.go |
=================================================================== |
--- a/src/pkg/strconv/fp_test.go |
+++ b/src/pkg/strconv/fp_test.go |
@@ -31,7 +31,7 @@ |
func myatof64(s string) (f float64, ok bool) { |
a := strings.SplitN(s, "p", 2) |
if len(a) == 2 { |
- n, err := strconv.Atoi64(a[0]) |
+ n, err := strconv.ParseInt(a[0], 10, 64) |
if err != nil { |
return 0, false |
} |
@@ -63,7 +63,7 @@ |
} |
return v * pow2(e), true |
} |
- f1, err := strconv.Atof64(s) |
+ f1, err := strconv.ParseFloat(s, 64) |
if err != nil { |
return 0, false |
} |
@@ -87,7 +87,8 @@ |
} |
return float32(float64(n) * pow2(e)), true |
} |
- f1, err1 := strconv.Atof32(s) |
+ f64, err1 := strconv.ParseFloat(s, 32) |
+ f1 := float32(f64) |
if err1 != nil { |
return 0, false |
} |