ID:               27685
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ymlee at ibcenter dot co dot kr
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: linux
 PHP Version:      4.3.4
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.
 
Thank you for your interest in PHP.

. 


Previous Comments:
------------------------------------------------------------------------

[2004-03-24 19:12:52] ymlee at ibcenter dot co dot kr

Description:
------------
$a=33.6;

$b=84.7;

$c=118.3;



$d=$a+$b-$c;



echo $d;



the answer should 0.

but result is 1.4210854715202E-14.



it is strange!!!

Reproduce code:
---------------
$a=33.6;

$b=84.7;

$c=118.3;



$d=$a+$b-$c;



echo $d;



Expected result:
----------------
0

Actual result:
--------------
1.4210854715202E-14




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27685&edit=1

Reply via email to