I have run across some confusing behaviour with square roots of complex numbers in python. Running this code:
from cmath import sqrt
a = 0.2
b = 0.2 + 0j
print(sqrt(a / (a - 1)))
print(sqrt(b / (b - 1)))
gives the output
0.5j
-0.5j
A similar thing happens with
print(sqrt(-1 * b))
print(sqrt(-b))
It appears these pairs of statements should give the same answer?