>>> import math >>> math.sqrt(-1) Traceback (most recent call last): File "<pyshell#7>", line 1, in <module> math.sqrt(-1) ValueError: math domain error I'd say math.sqrt(-1) should return 1j. Sturla Molden