#36493 [NEW]: Unable to determine maximum floating point b
From: terrafrost at gmail dot com
Operating system: Linux
PHP version: 4.4.2
PHP Bug Type: Math related
Bug description: Unable to determine maximum floating point b
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 bug report at http://bugs.php.net/?id=36493&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36493&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36493&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36493&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36493&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36493&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36493&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36493&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36493&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36493&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36493&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36493&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36493&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36493&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36493&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36493&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36493&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36493&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36493&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36493&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36493&r=mysqlcfg
Thread (3 messages)
- terrafrost at gmail dot com