Where is the correct round() method?
pigmartian
scottpig1 at comcast.net
Sun Jul 27 20:45:48 EDT 2008
it could be that 3.0 is using "banker's rounding" --- rounding to the
even digit. the idea behind it behind it being to reduce error
accumulation when working with large sets of values.
> Works for me on Python 2.5 on Linux running on "Intel(R) Core(TM)2 Duo
> CPU". What system are you on?
>
>
> It could be that 2.5 is really 2.49999... which would round down to 2,
> but on any modern CPU (using IEEE floating point), 2.5 should be
> representable exactly.
>
>
More information about the Python-list
mailing list