Round Function Error

"Mark Hedges" <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
Hi,

I'm using mysql 4.0.16-standard on Linux.

I've just noticed this:

mysql> select round(0.5);
+------------+
| round(0.5) |
+------------+
|          0 |
+------------+
1 row in set (0.00 sec)

--

mysql> select round(0.500001);
+-----------------+
| round(0.500001) |
+-----------------+
|               1 |
+-----------------+
1 row in set (0.00 sec)

--

Is it not the case that 0.5 should be rounded UP?

--
Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.