Tim Peters added the comment:

Bah.  It doesn't matter who's consuming the rounding of a binary float to 
decimal microseconds:  there are only 32 possible fractional parts where 
nearest/even and half-up deliver different results.  half-up preserves 
properties of these specific inputs that nearest/even destroys.  These inputs 
themselves have no bias - they're utterly uniformly spaced.

Not only does nearest/even _introduce_ bias on these inputs by destroying these 
properties, it doesn't even preserve the spacing between them.  Half-up leaves 
them all 5 microseconds apart, while nearest/even creates a bizarre "sometimes 
4 microseconds apart, sometimes 6" output spacing out of thin air.

So it's not a question of "when in doubt" to me, it's a question of "live up to 
what the docs already say".  Although, again, it doesn't make a lick of real 
difference.  That's why we'll never stop arguing about it ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23517>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to