Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'float': 0.05; 'differently': 0.07; 'python': 0.09; 'explanation': 0.09; '2.7': 0.13; '3.3,': 0.16; 'say.': 0.16; 'url:decimal': 0.16; 'wrote:': 0.17; 'stefan': 0.17; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; "d'aprano": 0.29; 'decimal': 0.29; 'received:78.46': 0.29; 'steven': 0.29; 'anyone': 0.33; 'to:addr :python-list': 0.33; 'received:org': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'decision': 0.60; 'content- disposition:inline': 0.60; 'behavior': 0.64 Date: Tue, 5 Feb 2013 14:05:26 +0100 From: Stefan Krah To: python-list@python.org Subject: Re: Decimal 0**0 References: <5110fa5c$0$29982$c3e8da3$5496439d@news.astraweb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5110fa5c$0$29982$c3e8da3$5496439d@news.astraweb.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360069967 news.xs4all.nl 6947 [2001:888:2000:d::a6]:34192 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38187 Steven D'Aprano wrote: > Does anyone have an explanation why Decimal 0**0 behaves so differently from > float 0**0? > > Tested in both Python 2.7 and 3.3, float 0**0 returns 1, as I would expect: The behavior follows the specification: http://speleotrove.com/decimal/daops.html#refpower Why exactly the decision was made I cannot say. Stefan Krah