Paul Kienzle wrote: > Let me rephrase: Can we have a function sqrt(x) which returns real if x is > nonnegative, and complex if it is negative? Similarly for other math functions > such as log which produce complex values for negative numbers? standard python is >>> import cmath >>> cmath.sqrt(-1) 1j