PHP 4.0 Bug #9692 Updated: Subtraction result below 100 yields wrong decimal output

From: Date: Mon, 12 Mar 2001 21:40:48 +0000
Subject: PHP 4.0 Bug #9692 Updated: Subtraction result below 100 yields wrong decimal output
Groups: php.dev 
Request: Send a blank email to php-dev+get-48770@lists.php.net to get a copy of this message
ID: 9692 Updated by: sniper Reported By: bhavint@directi.com Old-Status: Open Status: Closed Bug Type: Math related Assigned To: Comments: Yes it is. This bug report is about the same 'problem': #8164 And it has an url to a page that explains this better than I can. :) --Jani Previous Comments: --------------------------------------------------------------------------- [2001-03-12 01:12:17] bhavint@directi.com i dont think thats the same is it. Because all I am doing is a simple subtraction operation. Additionally the output comes perfect if the result is greater than 100 but does not come perfect if the output is lesser than 100 --------------------------------------------------------------------------- [2001-03-12 00:45:04] sniper@php.net Check the last comment on bug: #9288 --Jani --------------------------------------------------------------------------- [2001-03-12 00:41:11] bhavint@directi.com Please check http://www.transecute.com/~kalpesh/check.php4 In case (1) I subtract a number from another which should output '0.9' but insted outputs '0.90000000000009' In case (2) I subtract a number from another and it gives correct output This behaviour has been noticed if the result of the subtraction is greater than 100. I have also published my PHPINFO output on the same page for your reference. This bug is quite dangerous (especially for us when we are dealing with financial calculations for our payment gateway using PHP) since all our reports dont tally at the end of the day by tiny figures such as this. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9692&edit=2

« previous php.dev (#48770) next »