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.
5 // Copyright ©2017 The Gonum Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style
7 // license that can be found in the LICENSE file.
11 import math "gonum.org/v1/gonum/internal/math32"
13 // IsInf returns true if either real(x) or imag(x) is an infinity.
14 func IsInf(x complex64) bool {
15 if math.IsInf(real(x), 0) || math.IsInf(imag(x), 0) {
21 // Inf returns a complex infinity, complex(+Inf, +Inf).
22 func Inf() complex64 {
24 return complex(inf, inf)