Bug #1977 Updated: round() rounds .5's down, not up .. ie: 1.5 rounds to 1, 2.5 rounds to 2, etc.
| From: | Bug Database | Date: | Fri, 06 Aug 1999 03:54:45 +0000 |
| Subject: | Bug #1977 Updated: round() rounds .5's down, not up .. ie: 1.5 rounds to 1, 2.5 rounds to 2, etc. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9585@lists.php.net to get a copy of this message | ||
ID: 1977
Updated by: rasmus
Reported By: nick@surreallogic.com
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:
This is by no means a bug. Go read a math book please. The commonly implemented rule for rounding
a .5 number is to round up if the previous significant digit is odd and down if the previous
significant digit is even.
Also see: http://www.progressive-comp.com/Lists/?l=php3-general&m=93230944323512&w=2
Full Bug description available at: http://bugs.php.net/?id=1977