[docs] BUG: A wrong result of computation in python2.6

matthew chao mathewchao at gmail.com
Wed Feb 16 05:47:27 CET 2011


version: Python 2.6
OS : Windows 7

The variable x below should have been 10(integer) after the expression
evaluates. It ,however, gets the value 10.000000000000002 (float) , as
follows,
--------------------------------------------
>>> x=math.exp ( math.log(10.0))
>>> x
10.000000000000002


>>> x=math.exp ( math.log(10))
>>> x
10.000000000000002
--------------------------------------------

In mathematics, the result is not right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20110216/e957941b/attachment-0001.html>


More information about the docs mailing list