Closed vilchy closed 7 months ago
Currently, if the imaginary part of a complex number is zero, then the imaginary part of the result of sqrt is always zero (because sign(0) = 0):
sqrt
import complex sqrt Complex(-1., 0.) > Complex(0., 0.)
After the fix, sqrt returns the correct values:
import complex sqrt Complex(-1., 0.) > Complex(0., 1.)
Currently, if the imaginary part of a complex number is zero, then the imaginary part of the result of
sqrt
is always zero (because sign(0) = 0):After the fix,
sqrt
returns the correct values: