Bug #53632 [Opn->Asn]: PHP hangs on numeric value 2.2250738585072011e-308

From: Date: Sun, 02 Jan 2011 15:49:48 +0000
Subject: Bug #53632 [Opn->Asn]: PHP hangs on numeric value 2.2250738585072011e-308
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157517@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
 Updated by:         pajoye@php.net
 Reported by:        exploringbinary at gmail dot com
 Summary:            PHP hangs on numeric value 2.2250738585072011e-308
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            Math related
 Operating System:   Windows
 PHP Version:        5.3.4
-Assigned To:        
+Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

Dmitry, can you take a look at it please?


Previous Comments:
------------------------------------------------------------------------
[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


Thread (42 messages)

« previous php.bugs (#157517) next »