[docs] A possible Python bug.

George R Goffe grgoffe at yahoo.com
Thu Oct 24 21:09:25 CEST 2013


Hi,

I seem to recall reading something about this a while ago but don't recall exactly where.

I build Python 2.7 and 3.x from the repositories and both exhibit the same behavior:



python
Python 2.7.3 (default, Jul 24 2012, 11:41:40) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 182.12-95.80
86.32000000000001


/tools/python/cpython# ./python 
Python 3.4.0a0 (default:f315fecdfeb8, Apr  6 2013, 13:13:19) 
[GCC 4.9.0 20130405 (experimental)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 182.12-95.80
86.32000000000001

the bc utility on my system produces what I would term the correct answer:

bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
182.12-95.80
86.32


Am I missing something?

If this is a bug, I would be most willing to test any code changes that you might come up with.


Regards,

George...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20131024/b561336b/attachment-0001.html>


More information about the docs mailing list