float / rounding question

Mark Dickinson dickinsm at gmail.com
Sat Mar 8 01:12:34 CET 2008

On Mar 7, 5:12 pm, Piet van Oostrum <p... at cs.uu.nl> wrote:
> Python just uses the C library for printing, I presume, and the conversion
> routines in the C library are rather simplistic. It is, however, possible
> to do better, so that 53.6 -- although internally represented as something
> that could be described as 53.600000000000001 -- will actually be printed
> as 53.6.

There are issues with doing this portably and reliably.  See


for a recent discussion.


More information about the Python-list mailing list