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 <rep...@bugs.python.org>
<http://bugs.python.org/issue17865>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to