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

noreply@sourceforge.net noreply@sourceforge.net
Tue, 3 Oct 2000 02:53:55 -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]

Follow-Ups:

Date: 2000-Oct-03 02:53
By: ping

Comment:
Hi.  I just submitted patch 101751 to address this.
Hope this helps.
-------------------------------------------------------

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