Re: note 18956 deleted from function.round by imajes
| From: | alindeman@php.net | Date: | Tue, 19 Feb 2002 22:29:26 +0000 |
| Subject: | Re: note 18956 deleted from function.round by imajes | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-26811@lists.php.net to get a copy of this message | ||
I agree. .5 should round to the next number (like ceil) So 2.5 would round
to 3 (or it should)
--Andrew
On Tuesday 19 February 2002 10:03 am, you wrote:
> >js5@sanger.ac.uk
> >17-Jan-2002 11:17
> >
> >This isn't a bug. Rounding of "halves" is usally done to the
> >even number. This means that on average half of the "halves"
> >are rounded up and half of the "halves" are rounded down.
> >So that any "average" calculated should not be affected by
> >the rounding.
>
> Is this a non-USA thing or something?
>
> I've never heard of this method of rounding (and I've taken 24+ hours of
> math courses including Statistical Analysis and Engineering Math I).
>
> I've always been taught that .5 rounds to the next highest integer of
> abs(n), where n can be any number positive or negative.
>
> Just curious,
> Kenneth Love