Bug #13671 Updated: error of subtraction

From: Date: Mon, 15 Oct 2001 12:49:00 +0000
Subject: Bug #13671 Updated: error of subtraction
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67953@lists.php.net to get a copy of this message
ID: 13671 Updated by: derick Reported By: c.bolerichard@fabi.fr Old Status: Open Status: Bogus Bug Type: *Math Functions Operating System: linux PHP Version: 4.0.5 New Comment: They are fine, this is how floating point numbers work. You store ~1.12 and ~1.13, not exactly 1.12 and 1.13. Not a bug. Derick Previous Comments: ------------------------------------------------------------------------ [2001-10-15 08:28:16] c.bolerichard@fabi.fr These subtractions are false : $r1 = 1.13 - 1.12; $r2 = 1.12 - 1.13; echo "$r1"; /* return : 0.0099999999999998 */ echo "$r2"; /* return : -0.0099999999999998 */ Why ? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13671&edit=1

« previous php.dev (#67953) next »