[BangPypers] why is round() not working?

Baiju M mbaiju at zeomega.com
Fri Feb 19 08:15:13 CET 2010

On Fri, Feb 19, 2010 at 12:37 PM, Kenneth Gonsalves <lawgon at au-kbc.org> wrote:
> hi
>>>> round(2.1667000000000001,3)
> 2.1669999999999998

From: http://docs.python.org/tutorial/floatingpoint.html

you may be tempted to use the round() function to chop it back to the
single digit you expect. But that makes no difference:

>>> round(0.1, 1)

Baiju M

More information about the BangPypers mailing list