Rounding....

From: Date: Mon, 11 Feb 2002 03:22:37 +0000
Subject: Rounding....
References: 1  Groups: php.dev php.general 
Request: Send a blank email to php-dev+get-79923@lists.php.net to get a copy of this message
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...

« previous php.dev (#79923) next »