Mathematics in Python are not correct

Christian Heimes lists at cheimes.de
Thu May 8 20:08:33 EDT 2008


Luis Zarrabeitia schrieb:
>>>> 0**0
> 1
> 
> That 0^0 should be a nan or exception, I guess, but not 1.

No, that's correct for floats. Read the wikipedia article or the C99
standard for more information.

Christian




More information about the Python-list mailing list