aboutsummaryrefslogtreecommitdiff
path: root/test/cmplxdivide.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-11-08 15:43:02 -0800
committerRob Pike <r@golang.org>2011-11-08 15:43:02 -0800
commitf9489bed72f43333e50346785b75feff4e646aae (patch)
tree5dab217cfac15c650628e9855fb6f7c8dab0b661 /test/cmplxdivide.go
parent45e3bcb34389808232f61899936731ebacb778ef (diff)
downloadgo-f9489bed72f43333e50346785b75feff4e646aae.tar.gz
go-f9489bed72f43333e50346785b75feff4e646aae.zip
renaming_4: gofix -r everything/but/src/pkg
R=rsc CC=golang-dev https://golang.org/cl/5338043
Diffstat (limited to 'test/cmplxdivide.go')
-rw-r--r--test/cmplxdivide.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/cmplxdivide.go b/test/cmplxdivide.go
index 6a67b175de..461ee9796e 100644
--- a/test/cmplxdivide.go
+++ b/test/cmplxdivide.go
@@ -9,14 +9,14 @@
package main
import (
- "cmath"
"fmt"
"math"
+ "math/cmplx"
)
-type Test struct{
- f, g complex128
- out complex128
+type Test struct {
+ f, g complex128
+ out complex128
}
var nan = math.NaN()
@@ -25,9 +25,9 @@ var negzero = math.Copysign(0, -1)
func calike(a, b complex128) bool {
switch {
- case cmath.IsInf(a) && cmath.IsInf(b):
+ case cmplx.IsInf(a) && cmplx.IsInf(b):
return true
- case cmath.IsNaN(a) && cmath.IsNaN(b):
+ case cmplx.IsNaN(a) && cmplx.IsNaN(b):
return true
}
return a == b
@@ -36,7 +36,7 @@ func calike(a, b complex128) bool {
func main() {
bad := false
for _, t := range tests {
- x := t.f/t.g
+ x := t.f / t.g
if !calike(x, t.out) {
if !bad {
fmt.Printf("BUG\n")