Re: [GENERAL] Strange round behaviour w/ more than 2 decimals

2007-07-11 Thread Fernando Madruga Pinheiro
, Tom Lane <[EMAIL PROTECTED]>: "Fernando Madruga Pinheiro" <[EMAIL PROTECTED]> writes: > If I use ROUND(1.8947, 2), it should return 1.90, but it does return 1.89. Why do you consider that wrong? It's the closest approximation. Do you know of any other software that

[GENERAL] Strange round behaviour w/ more than 2 decimals

2007-07-11 Thread Fernando Madruga Pinheiro
Hi. I'm having some strange round behaviour when using 4 decimals. If I use ROUND(1.8947, 2), it should return 1.90, but it does return 1.89. Rounding to 3 decimal places, then 2 (eg.: ROUND(ROUND(1.8947, 3), 2) ) then I get 1.90! This way, when rounding, ROUND is considering only decimal places