Stuart Brorson wrote:
>>>>> math.pow(0, -1)
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>> ValueError: math domain error
> 
> Why isn't this one inf?

The standard says return inf and raise a divide-by-zero floating point
exception. Since we can't do both in Python we sticked to the exception
part.

> Also, what do these specs say about 0^<complex>?

See for yourself
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf The
interesting information are in Annex F.9 and Annex G.6.

So far we haven't dealt with complex powers and Python doesn't support
0.**1j yet.

Christian

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to