Re: Rounding....

From: Date: Mon, 11 Feb 2002 03:58:20 +0000
Subject: Re: Rounding....
References: 1  Groups: php.dev php.general 
Request: Send a blank email to php-dev+get-79924@lists.php.net to get a copy of this message
I guess that's because nobody knows beforehand which direction the fuzz should go - should it go "a little" upwards or "a little" downwards in order to match all systems? Just my two cents. Bogdan Matthew Clark wrote: > Seeing as the mathematically correct way to round numbers is to round down > to n for n-1<=m<=n.5 and up to n+1 for n.5<m<n+1, I wonder why the PHP > round() function couldn't include a little 'fuzz' to handle the rounding > problems we encounter due to floating point representation in the hardware? > It could even be a configurable option - but it would save writing a > wrapper... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.dev (#79924) next »