Re: Bug #1977 Updated: round() rounds .5's down, not up .. ie: 1.5 rounds to 1, 2.5 rounds to 2, etc.

From: Date: Sun, 08 Aug 1999 18:30:37 +0000
Subject: Re: Bug #1977 Updated: round() rounds .5's down, not up .. ie: 1.5 rounds to 1, 2.5 rounds to 2, etc.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-9655@lists.php.net to get a copy of this message
At 03:54 AM 8/6/99 +0000, Bug Database wrote:
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.
Hmm, that doesn't sound right - n.5 is always rounded up to (n+1).0. It has nothing to do with the computer-related problem of limited accuracy... Zeev

« previous php.dev (#9655) next »