Olaf Schmidt <[EMAIL PROTECTED]> wrote:
> The integrated round-function works well so far,
> especially because it does "bankers rounding".
> Tough it seems to have a little bug, wich is probably simple to fix.
>
> Try...
> select round(0.94, 1) -> gives 0.9, wich is correct
> select round(0.96, 1) -> gives 1, wich is correct too
>
> but...
> select round(0.95, 1) -> gives 0, wich is not correct of course
> Regarding bankers rounding, wich rounds up in case of a
> '5' at the appropriate position, the correct result should be 1.
>
> (tested with 3.3.17)

I do not know what are you trying to round. In any case, I just can
say that if you are storing a column as a float for money, turn it
into a string. This is what I've learned when writing Perl code to
deal with money :)

Cheers
Alberto

--
Alberto Simões

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to