SciProgCentre/kmath

ComplexField.power gives invalid return values for negative integer reals with a real power

Opened this issue · 2 comments

Example:

ComplexField.power(Complex(-3.0, 0.0), 0.5)

This results in a complex result where both the real and imaginary parts are NaN.

Workaround:

ComplexField(Complex(-3.0, 0.0), Complex(0.5, 0.0))

Thank you, I've reproduced it on the latest build.

Thanks again, the problem was in optimization made for complex numbers without real part: 8a754ac.