Subject "Bankers Rounding" Function
Author C Fraser
Hi,

Is there an easy way to get "Bankers" or unbiased rounding of numbers in
Interbase/Firebird?? A function or UDF available?

Just to explain... using 0.145 FormatFloat in Delphi gives 1.5, where as
FormatCurr gives 1.4 (though the documentation wouldn't give you any
clue about this).

In our apps we have used FormatCurr and Format('%m', [0.145]) but this
does not equal what the database spits out... We have determined it is
because IB/Firebird always rounds up (biased rounding) which is fine,
just wondering if there is a function to do what we are after
(otherwise, we shall change all our code to use FormatFloat instead, not
tooooo much of a biggie).

Regards

Colin


######################################################################
Attention:
The information in this email and in any attachments is confidential.
If you are not the intended recipient then please do not distribute,
copy or use this information. Please notify us immediately by return
email and then delete the message from your computer.
Any views or opinions presented are solely those of the author.
######################################################################