[New-bugs-announce] [issue17865] PowerPC exponentiation and round() interaction

Ellen Wang report at bugs.python.org
Mon Apr 29 05:29:26 CEST 2013


New submission from Ellen Wang:

This is only on a PowerPC, specifically a p2020, running Debian 7.0 wheezy, python 2.7.3.

Calling round() seems to corrupt something (in the floating point state?) that causes subsequent exponentiation (the ** operator) to be wrong:

Python 2.7.3 (default, Jan  2 2013, 16:38:11)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 2 ** -2
0.25
>>> round(1)
1.0
>>> 2 ** -2
0.1253019036571362

Cool.  Huh?

----------
components: Library (Lib)
files: math.py
messages: 188033
nosy: squeakbat
priority: normal
severity: normal
status: open
title: PowerPC exponentiation and round() interaction
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file30054/math.py

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


More information about the New-bugs-announce mailing list