#23608 [Opn->Bgs]: Error in round() numbers

From: Date: Tue, 13 May 2003 14:30:33 +0000
Subject: #23608 [Opn->Bgs]: Error in round() numbers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39528@lists.php.net to get a copy of this message
ID: 23608 Updated by: derick@php.net Reported By: lorang at e-connect dot lu -Status: Open +Status: Bogus Bug Type: Math related Operating System: Linux RedHat 8.0 PHP Version: 4.3.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php See the manual on floats Previous Comments: ------------------------------------------------------------------------ [2003-05-13 09:24:18] lorang at e-connect dot lu Starnge bug : $tva=1.005+0.005-0.005; echo number_format($tva,2); outputs 1.00 instead of 1.01 but : $tva=1.005+(0.005-0.005); echo number_format($tva,2); outputs 1.01 what is correct but this should not be influenced by the brackets. and : $tva=1.05+0.05-0.05; echo number_format($tva,1); outputs 1.1 what is correct Thankx for reply Regards, Lorang Jacques ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23608&edit=1

« previous php.bugs (#39528) next »