Re: rounding problem

2004-10-26 Thread Amer Neely
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I came upon an alogrithm years ago somewhere that showed how to programmatically round numbers. Here it is: // num is the number we want to round. it may be int or fp. // what is what we want to round num to (ie nearest 10, 1/100, etc) // The rounding

Re: rounding problem

2004-10-25 Thread V. M. Brasseur
This must be a bug that was fixed in the 4.1 version. I see the same thing as Tom, using both 3.23.49 and 4.0.20... Oh, wait. The ever-helpful manual comes through again: From the manual documentation on ROUND(): "Note that the behavior of ROUND() when the argument is halfway between two integ

RE: rounding problem

2004-10-25 Thread Edgar Meij
Hmmm, peculiar... Tried it on 4.1.6-gamma-nt and works fine: SELECT ROUND(3.575, 2); = 3,57 SELECT ROUND(3.565, 2); = 3.56 The round() function probably cuts off the last bit... More info: http://lists.mysql.com/myodbc/8 Regards, Edgar -Oorspronkelijk bericht- Van: Tom Butterworth [m