Decimal ROUND_HALF_EVEN Default
Tim Peters
tim.peters at gmail.com
Mon Jan 16 19:33:45 EST 2006
[3c273]
> I'm just curious as to why the default rounding in the decimal module is
> ROUND_HALF_EVEN instead of ROUND_HALF_UP.
Because it's the best (numerically "fairest") rounding method for most
people most of the time.
> All of the decimal arithmetic I do is rounded half up and I can't think of
> why one might use round half even.
Because you want better numeric results, or because your application
requires it. "Half-even" is also called "banker's rounding" in the
United States, because it's required in many (but not all) banking
applications.
More information about the Python-list
mailing list