Bug #15948 Updated: Basic Subtraction Error

From: Date: Fri, 08 Mar 2002 07:36:12 +0000
Subject: Bug #15948 Updated: Basic Subtraction Error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1988@lists.php.net to get a copy of this message
ID: 15948 Updated by: derick@php.net Reported By: abuckner@cicadadesign.com -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: Red Hat Linux 7.1 PHP Version: 4.0.6 New Comment: This is actually not a bug, but a normal thing with floatingpoint numbers. If you want to do precise calculating, use cents, or decrease the precision in php.ini from 14 to something like 10. Derick Previous Comments: ------------------------------------------------------------------------ [2002-03-08 02:06:01] abuckner@cicadadesign.com This was submitted by one of our head developers. We're using PHP/MySQL to build our customer relationship software, and this scares me. ----------------------- The numbers should add to 0. When I echo the result I get the below: -5.6843418860808E-14. <? echo 241.20 + 169.23 - 410.43; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15948&edit=1

« previous php.bugs (#1988) next »