| // $G $D/$F.go $D/cmplxdivide1.go && $L $D/$F.$A && ./$A.out |
| // Copyright 2010 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Driver for complex division table defined in cmplxdivide1.go |
| var negzero = math.Copysign(0, -1) |
| func calike(a, b complex128) bool { |
| case cmplx.IsInf(a) && cmplx.IsInf(b): |
| case cmplx.IsNaN(a) && cmplx.IsNaN(b): |
| for _, t := range tests { |
| fmt.Printf("%v/%v: expected %v error; got %v\n", t.f, t.g, t.out, x) |