I'm doing some arithmetic on complex numbers involving INFs, and getting
unexpected NANs.

py> INF = float('inf')
py> z = INF + 3j
py> z
(inf+3j)
py> -z
(-inf-3j)

So far, nothing unexpected has occurred. But:

py> -1*z  # should be the same as -z
(-inf+nanj)


And even more strange:

py> 1*z
(inf+nanj)



Is this the right behaviour? If so, what's the justification for it?


-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to