#36493 [Opn->Asn]: Unable to determine maximum floating point b
| From: | tony2001@php.net | Date: | Thu, 23 Feb 2006 15:24:44 +0000 |
| Subject: | #36493 [Opn->Asn]: Unable to determine maximum floating point b | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93567@lists.php.net to get a copy of this message | ||
ID: 36493
Updated by: tony2001@php.net
Reported By: terrafrost at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: Math related
Operating System: Linux
PHP Version: 4.4.2
-Assigned To:
+Assigned To: tony2001
Previous Comments:
------------------------------------------------------------------------
[2006-02-23 07:11:16] terrafrost at gmail dot com
Description:
------------
I've ran into some difficulty attempting to figure out what the maximum
size of the exponent in floats is.
Reproduce code:
---------------
<?
$x = 2;
$y = 1;
for ($bits=1; ($x*=2) > ($y*=2); $bits++);
echo $bits;
?>
Expected result:
----------------
Assuming php.net's statement about the 64-bit IEEE standard being the
most common representation of float, I'd expect to get 1024 as the
result.
Actual result:
--------------
On Windows, I do indeed get the correct result. On Linux, all I get
are timeout errors. I've tried it with both PHP4 and PHP5 and get the
same results for each.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36493&edit=1