Subject Re: [IBO] Rounding problems
Author Daniel Rail
At 16/05/2002 10:38 AM, you wrote:
>Is the normal behaviour of round wanted by the rest of you?

The behavior that you see is performed by the processor itself. It's
called the Banker's Rounding and is an IEEE standard. Delphi doesn't
implement any code, but simply passes the value to the processor to be
rounded. If you want another algorithm, then simply create your own
function that will perform this. I had to do the same for financial
calculations in my application when I noticed that my accounting
software(QuickBooks and Quicken) didn't do the banker's rounding.

>Or maybe this is the way you want it to work too?

Even the rounding in Firebird and Interbase uses the processor's rounding
algorithm.

This discussion has been a lengthy one on another discussion forum, I'm not
sure if it was IB-Support or Firebird-Devel. I know that I did find the
information mentioned above.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)