<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 11, 2015 at 9:18 AM, Emile van Sebille <span dir="ltr"><<a href="mailto:emile@fenx.com" target="_blank">emile@fenx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 9/10/2015 11:27 PM, Serhiy Storchaka wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 11.09.15 06:13, Steven D'Aprano wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How does this differ from round(a/b)? round() also rounds to even.<br>
</blockquote>
<br>
 >>> round(5000000000000000/9999999999999999)<br>
0<br>
 >>> round(14999999999999999/10000000000000000)<br>
2<br>
<br>
But fractions 5000000000000000/9999999999999999 > 1/2 and<br>
14999999999999999/10000000000000000 < 3/2.<br>
<br>
</blockquote>
<br></span>
Wow -- I'm glad I work predominately in business environments and keep amounts in pennies. The only time I need to round anything is to the nearest cent.<span class="HOEnZb"><font color="#888888"></font></span><br></blockquote></div><br></div><div class="gmail_extra">I thought any programmer worth their salt would round down (i.e. trunc()) and transfer the fractional penny to their own account? :-)<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>