[Python-bugs-list] [Bug #115831] 0.0**-2.0 returns "inf" instead of raising ValueError

noreply@sourceforge.net noreply@sourceforge.net
Mon, 2 Oct 2000 03:43:26 -0700


Bug #115831, was updated on 2000-Oct-02 03:43
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: 0.0**-2.0 returns "inf" instead of raising ValueError

Details: 0.0**(-2.5) correctly raises "ValueError: 0.0 to a negative power", but
0.0**(-2.0) or 0.0**(-2) returns "inf", instead of raising the same exception.
Something wrong here?

0**0 (integer or float) does return 1 which is correct limiting value.

[Reported to me by William Park]

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=115831&group_id=5470