This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gboutsioukis
Recipients gboutsioukis, mark.dickinson
Date 2008-07-19.02:35:24
SpamBayes Score 0.000300529
Marked as misclassified No
Message-id <>
The issue is that the implementation of round includes multiplying the
number by 10**ndigits, thus unnecessarily losing some precision for
large numbers within the IEEE754 double limits. This means that even
smaller numbers can produce these results for higher ndigit values, eg.

>>> round(56294995342131.5, 3) #one less digit

In the submitted patch I used modf to split the number and keep the
integral intact.
Date User Action Args
2008-07-19 02:35:26gboutsioukissetspambayes_score: 0.000300529 -> 0.000300529
recipients: + gboutsioukis, mark.dickinson
2008-07-19 02:35:26gboutsioukissetspambayes_score: 0.000300529 -> 0.000300529
messageid: <>
2008-07-19 02:35:25gboutsioukislinkissue1869 messages
2008-07-19 02:35:25gboutsioukiscreate