summaryrefslogtreecommitdiff
path: root/src/lib/strconv/atof.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-01-22 16:23:44 -0800
committerRuss Cox <rsc@golang.org>2009-01-22 16:23:44 -0800
commit29760f278cf9110e9e165af3f8aa53a89ff94f86 (patch)
treeece2442553c8681e8134d2201e6201e1e429adb8 /src/lib/strconv/atof.go
parentca01b9bdc8fc325f98c57b1949942edfc00867f7 (diff)
downloadgolang-29760f278cf9110e9e165af3f8aa53a89ff94f86.tar.gz
move math routines from package sys to package math,
though they still build in src/runtime. use cgo instead of hand-written wrappers. R=r DELTA=740 (289 added, 300 deleted, 151 changed) OCL=23326 CL=23331
Diffstat (limited to 'src/lib/strconv/atof.go')
-rw-r--r--src/lib/strconv/atof.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/strconv/atof.go b/src/lib/strconv/atof.go
index e562bfdb3..358594416 100644
--- a/src/lib/strconv/atof.go
+++ b/src/lib/strconv/atof.go
@@ -11,6 +11,7 @@
package strconv
import (
+ "math";
"os";
"strconv";
)
@@ -329,7 +330,7 @@ func Atof64(s string) (f float64, err *os.Error) {
}
}
b, ovf := decimalToFloatBits(neg, d, trunc, &float64info);
- f = sys.Float64frombits(b);
+ f = math.Float64frombits(b);
if ovf {
err = os.ERANGE;
}
@@ -347,7 +348,7 @@ func Atof32(s string) (f float32, err *os.Error) {
}
}
b, ovf := decimalToFloatBits(neg, d, trunc, &float32info);
- f = sys.Float32frombits(uint32(b));
+ f = math.Float32frombits(uint32(b));
if ovf {
err = os.ERANGE;
}