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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, shlomoa
Date 2007-12-07.10:13:47
SpamBayes Score 0.0203899
Marked as misclassified No
Message-id <>
Your function is not better:

>>> print my_round(s,2)
>>> my_round(s,2)

print uses str(), and restricts itself to 12 significant digits.
the direct call uses repr(), and display the most precise number.

The problem is not in the computation, but is inherent to the 'float'
type which cannot represent 1.41 exactly. Please carefully read the faq
entry above.
Date User Action Args
2007-12-07 10:13:48amaury.forgeotdarcsetspambayes_score: 0.0203899 -> 0.0203899
recipients: + amaury.forgeotdarc, shlomoa
2007-12-07 10:13:48amaury.forgeotdarcsetspambayes_score: 0.0203899 -> 0.0203899
messageid: <>
2007-12-07 10:13:48amaury.forgeotdarclinkissue1565 messages
2007-12-07 10:13:47amaury.forgeotdarccreate