Re: RoundEx without Banker's rounding
- From: Max <nospam@xxxxxxxxxx>
- Date: Sun, 04 Dec 2005 15:07:58 +0100
Dennis wrote:
I think that it is a challenge we could make soon.
I am thinking about something like...
function RoundEx(x: Extended; DecimalRoundingCtrl: TDecimalRoundingCtrl): Int64;
tDecimalRoundingCtrl = {Defined rounding methods} {From DecimalRounding_JH0}
(drNone, {No rounding.}
drHalfEven, {Round to nearest else to even digit. a.k.a Bankers}
drHalfOdd, {Round to nearest else to odd digit. }
drHalfPos, {Round to nearest else toward positive. }
drHalfNeg, {Round to nearest else toward negative. }
drHalfDown, {Round to nearest else toward zero. }
drHalfUp, {Round to nearest else away from zero. }
drRndNeg, {Round toward negative. a.k.a. Floor}
drRndPos, {Round toward positive. a.k.a. Ceil }
drRndDown, {Round toward zero. a.k.a. Trunc}
drRndUp); {Round away from zero.}.
- Follow-Ups:
- Re: RoundEx without Banker's rounding
- From: Max
- Re: RoundEx without Banker's rounding
- References:
- RoundEx without Banker's rounding
- From: Max
- Re: RoundEx without Banker's rounding
- From: Dennis
- RoundEx without Banker's rounding
- Prev by Date: Re: RoundEx without Banker's rounding
- Next by Date: Re: RoundEx without Banker's rounding
- Previous by thread: Re: RoundEx without Banker's rounding
- Next by thread: Re: RoundEx without Banker's rounding
- Index(es):
Relevant Pages
|