[ python-Bugs-1025872 ] X to the power of 0 may give wrong answer

SourceForge.net noreply at sourceforge.net
Fri Sep 10 15:53:24 CEST 2004


Bugs item #1025872, was opened at 2004-09-10 23:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1025872&group_id=5470

Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Nick Coghlan (ncoghlan)
Assigned to: Nobody/Anonymous (nobody)
Summary: X to the power of 0 may give wrong answer

Initial Comment:
According to Python 2.3 and 2.4, -1 ** 0 = -1 ! It
appears to do this for any negative value.

The answer to x ** 0 should be 1, regardless of the
sign of x.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1025872&group_id=5470


More information about the Python-bugs-list mailing list