Bug #53632 [Asn]: PHP hangs on numeric value 2.2250738585072011e-308
| From: | exploringbinary at gmail dot com | Date: | Sun, 02 Jan 2011 15:52:44 +0000 |
| Subject: | Bug #53632 [Asn]: PHP hangs on numeric value 2.2250738585072011e-308 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157518@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53632&edit=1
ID: 53632
User updated by: exploringbinary at gmail dot com
Reported by: exploringbinary at gmail dot com
Summary: PHP hangs on numeric value 2.2250738585072011e-308
Status: Assigned
Type: Bug
Package: Math related
Operating System: Windows
PHP Version: 5.3.4
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
I also get the same problem on Linux (PHP Version 5.3.2-1ubuntu4.5).
Previous Comments:
------------------------------------------------------------------------
[2011-01-02 16:49:48] pajoye@php.net
Dmitry, can you take a look at it please?
------------------------------------------------------------------------
[2011-01-02 16:44:38] exploringbinary at gmail dot com
(Remove 2.2250738585072012e-308 from my list of examples; it does NOT
map to the same floating-point number as 2.2250738585072011e-308 -- when
converted correctly!)
------------------------------------------------------------------------
[2010-12-30 06:58:41] exploringbinary at gmail dot com
Description:
------------
If I assign the value 2.2250738585072011e-308 to a variable, e.g. $d =
2.2250738585072011e-308, PHP hangs (loops). I am using PHP 5.3.1 XAMPP
1.7.3 on Windows.
2.2250738585072011e-308 represents the largest subnormal
double-precision floating-point number,
0.1111111111111111111111111111111111111111111111111111 x 2^-1022.
Interestingly, nearby decimal literals 2.2250738585072008e-308,
2.2250738585072009e-308, 2.2250738585072010e-308 and
2.2250738585072012e-308 -- which all convert to the same floating-point
value -- do not cause this problem.
Test script:
---------------
<?php $d = 2.2250738585072011e-308; ?>
Expected result:
----------------
No Hang.
Actual result:
--------------
Hang.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53632&edit=1