On 16 Jan 2006 20:36:12 -0800, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote:
>LordLaraby wrote:
>> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I
>> confess to never having heard the terms.
>
>The terms are defined in the docs for the Context object:
>http://docs.python.or
Thanks to all! Interesting reading.
Louis
--
http://mail.python.org/mailman/listinfo/python-list
LordLaraby wrote:
> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I
> confess to never having heard the terms.
There was a Slashdot article on rounding a short while back:
http://developers.slashdot.org/article.pl?sid=06/01/05/1838214
--
http://mail.python.org/mailman/listinfo
[LordLaraby]
> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP?
Not banker's rounding ;-). Same answer if you had said ROUND_HALF_UP
instead (which I assume you intended) -- most of these don't have
cute names.
> I confess to never having heard the terms.
ROUND_HALF_UP etc are
LordLaraby wrote:
> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I
> confess to never having heard the terms.
The terms are defined in the docs for the Context object:
http://docs.python.org/lib/decimal-decimal.html
The rounding option is one of:
--
LordLaraby wrote:
> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I
> confess to never having heard the terms.
> I usually do: Y = int(X + 0.5) scaled to proper # of decimal places.
> Which type of rounding is this? If either.
Google Is Your Friend:
http://www.diycalculator.c
If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I
confess to never having heard the terms.
I usually do: Y = int(X + 0.5) scaled to proper # of decimal places.
Which type of rounding is this? If either.
--
http://mail.python.org/mailman/listinfo/python-list
[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
"3c273" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Hello,
>
> I'm just curious as to why the default rounding in the decimal module
> is ROUND_HALF_EVEN instead of ROUND_HALF_UP. All of the decimal
> arithmetic I do is rounded half up and I can't think of why one might
> use round hal