[New-bugs-announce] [issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

Stefan Krah report at bugs.python.org
Sat Oct 3 15:59:24 CEST 2009


New submission from Stefan Krah <stefan-usenet at bytereef.org>:

If precision 1 is aupported, the following results should not be NaN:

Python 2.7a0 (trunk:74738, Sep 10 2009, 11:50:08) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from decimal import *
>>> setcontext(Context(prec=1, rounding=ROUND_UP,
Emin=-999999999999999999, Emax=999999999999999999, capitals=1, flags=[],
traps=[]))
>>> pow(Decimal(0), Decimal(3), Decimal(70))
Decimal('NaN')
>>> pow(Decimal(3), Decimal(0), Decimal(70))
Decimal('NaN')
>>>

----------
messages: 93493
nosy: skrah
severity: normal
status: open
title: decimal.py: NaN result in pow(x, y, z) with prec 1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7049>
_______________________________________


More information about the New-bugs-announce mailing list