summaryrefslogtreecommitdiff
path: root/test/float_lit.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-10-29 13:58:12 -0700
committerRuss Cox <rsc@golang.org>2008-10-29 13:58:12 -0700
commitec7031c7a2ca1487fc10ccfa5cfb2cd943837164 (patch)
treec8f3a4be36e63009061c5aa9ad5037ed6d25f3cb /test/float_lit.go
parent27ab89ee1e746de038c4d3137d7f263eb4886425 (diff)
downloadgo-ec7031c7a2ca1487fc10ccfa5cfb2cd943837164.tar.gz
minor int/float fixes
R=ken OCL=18032 CL=18032
Diffstat (limited to 'test/float_lit.go')
-rw-r--r--test/float_lit.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/float_lit.go b/test/float_lit.go
index 49a794528..a78a6e924 100644
--- a/test/float_lit.go
+++ b/test/float_lit.go
@@ -7,7 +7,7 @@
package main
func
-pow10(pow int) double
+pow10(pow int) float64
{
if pow < 0 { return 1/pow10(-pow); }
if pow > 0 { return pow10(pow-1)*10; }
@@ -15,9 +15,9 @@ pow10(pow int) double
}
func
-close(da double, ia, ib int64, pow int) bool
+close(da float64, ia, ib int64, pow int) bool
{
- db := double(ia) / double(ib);
+ db := float64(ia) / float64(ib);
db *= pow10(pow);
if da == 0 {