Mark Dickinson <dicki...@gmail.com> added the comment:

[Steven]

py> '%.17f' % 0.95
'0.94999999999999996'

That's tricky to use correctly: it's not a priori clear how many digits after 
the point are needed to give you a faithful representation (the "17" in "%.17f" 
isn't going to be the right thing for most values). You really want to specify 
the number of significant digits rather than the number of places after the 
point, and even then there are going to be cases where 17 significant digits 
aren't enough to show you which side of a tie the exact value lies.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38703>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to