diff options
Diffstat (limited to 'libgo/go/math/cmplx/pow.go')
-rw-r--r-- | libgo/go/math/cmplx/pow.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/math/cmplx/pow.go b/libgo/go/math/cmplx/pow.go index 1630b87..5a405f8 100644 --- a/libgo/go/math/cmplx/pow.go +++ b/libgo/go/math/cmplx/pow.go @@ -48,6 +48,9 @@ import "math" // Pow(0, c) for real(c)<0 returns Inf+0i if imag(c) is zero, otherwise Inf+Inf i. func Pow(x, y complex128) complex128 { if x == 0 { // Guaranteed also true for x == -0. + if IsNaN(y) { + return NaN() + } r, i := real(y), imag(y) switch { case r == 0: |