3 // Copyright 2010 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Driver for complex division table defined in cmplxdivide1.go
8 // For details, see the comment at the top of cmplxdivide.c.
17 func calike(a, b complex128) bool {
18 if imag(a) != imag(b) && !(math.IsNaN(imag(a)) && math.IsNaN(imag(b))) {
22 if real(a) != real(b) && !(math.IsNaN(real(a)) && math.IsNaN(real(b))) {
31 for _, t := range tests {
33 if !calike(x, t.out) {
38 fmt.Printf("%v/%v: expected %v error; got %v\n", t.f, t.g, t.out, x)
42 panic("cmplxdivide failed.")