1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 // IsInf returns true if either real(x) or imag(x) is an infinity.
10 func IsInf(x complex128) bool {
11 if math.IsInf(real(x), 0) || math.IsInf(imag(x), 0) {
17 // Inf returns a complex infinity, cmplx(+Inf, +Inf).
18 func Inf() complex128 {
20 return cmplx(inf, inf)