In article <9b6c4v$m41$[EMAIL PROTECTED]> you write:
>Correction, MySQL is not returning floor, since it returns 2 for round(1.5). - I
>didn't see it.
>MySQL should not return 2 for round(2.5), but it should return 3. I think it's
>MySQL bug.
>
>How about ask in MySQL mailing list?

I don't think it's just a MySQL thing... it occurs in PostgreSQL as
well...

test=> select version();
                                version                                 
------------------------------------------------------------------------
 PostgreSQL 7.0.3 on i386-unknown-freebsdelf4.1, compiled by gcc 2.95.2
(1 row)

test=> select round(1.5);
 round 
-------
     2
(1 row)

test=> select round(2.5);
 round 
-------
     2
(1 row)


However, you could always do floor(number + .5) to consistent
behaviour...

-philip

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to