>>>>> "Steve" == Steve Ruby <stever@stripped> writes:
>> > >Why doesn't the ROUND function work like it says in the manual? The
>> > >says:
>> > >
>> The expected behaviour for ROUND(), as I see it, would be to round
>> toward the nearest integer number:
>> ROUND(-1.9) --> -2
>> ROUND(-1.1) --> -1
>> ROUND(0.1) --> 1 <-------- I assume you mean 0 here ?
>> ROUND(0.9) --> 2
Steve> this is somewhat disturbing. I imagine that TCX will consdier it a bug
Steve> though, they
Steve> have made efforts to make the functionality of the win and UNIX version
Steve> as close
Steve> as possible. The way the unix round works seems reasonable to me, but
Steve> the win
Steve> one is kind of disturbing it always goes for the next higher int
Steve> round(0.0000000001) = 1 ouch
I just found a bug in our win32 implementation of rint() that causes
round() to not round to the nearest integer.
I will fix this for the next MySQL-Win32 version.
This will solve everything, except the problem with rounding of x.5 ;
This will always be rounded downwards. (Sorry, but I don't know how
to fix this on easily on Win32)