Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38187

Re: Decimal 0**0

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 <stefan@bytereef.org>
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 <stefan@bytereef.org>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1364.1360069967.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


Steven D'Aprano <steve+comp.lang.python@pearwood.info> 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


Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Decimal 0**0 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-05 23:26 +1100
  Re: Decimal 0**0 Stefan Krah <stefan@bytereef.org> - 2013-02-05 14:05 +0100
  Re: Decimal 0**0 Tim Roberts <timr@probo.com> - 2013-02-06 21:47 -0800
    Re: Decimal 0**0 Terry Reedy <tjreedy@udel.edu> - 2013-02-07 03:38 -0500
    Re: Decimal 0**0 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-08 10:31 +1100

csiph-web