Ellen Wang added the comment: Here's an example that uses only math library functions and float literals, presumably with a simpler code path:
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. >>> import math >>> math.exp(-2.0) 0.1353352832366127 >>> math.ceil(1.0) 1.0 >>> math.exp(-2.0) 0.23902241864785234 By the way, the equivalent C program (using exp() and ceil()) on the same platform behaves correctly, so it's not an obvious libc or fpu problem. ---------- _______________________________________ 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