ID:               41106
 Updated by:       [EMAIL PROTECTED]
 Reported By:      neel dot basu dot z at gmail dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Math related
 Operating System: Windows
 PHP Version:      5.1.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




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

[2007-04-16 18:05:29] neel dot basu dot z at gmail dot net

I am Using php 5.1.6

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

[2007-04-16 18:03:16] neel dot basu dot z at gmail dot net

Description:
------------
Simple Expression but wrong output.

Reproduce code:
---------------
<?php
$res1 = (1.2-0.1)-1.1;// = 1.1-1.1 -> Evaluates to Zero
$res2 = (2.2-0.1)-2.1;// = 2.1-2.1 -> Also Evaluates to Zero
echo $res1."\t".gettype($res1);
echo "\n";
echo $res2."\t".gettype($res2);
?>

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

Actual result:
--------------
-2.22044604925E-016   double
0   double


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


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

Reply via email to