note 21436 rejected from function.round by sander
| From: | sander@php.net | Date: | Mon, 13 May 2002 12:41:38 +0000 |
| Subject: | note 21436 rejected from function.round by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-30584@lists.php.net to get a copy of this message | ||
This was taken from the MySQL site. I suspect the same applies to the PHP round function.
Note that the behavior of ROUND() when the argument is half way between two integers depends on the
C library implementation. Some round to the nearest even number, always up, always down, or always
toward zero. If you need one kind of rounding, you should use a well-defined function like
TRUNCATE() or FLOOR() instead.