ID: 31504
Updated by: [EMAIL PROTECTED]
Reported By: charlesb at ekit-inc dot com
-Status: Open
+Status: Assigned
Bug Type: Variables related
Operating System: sol9 i86, sol8 sparc, sol9 sparc
PHP Version: 4.3.10
-Assigned To:
+Assigned To: derick
New Comment:
This works fine for me on Linux, I will need access to a solaris
machine with GDB installed to try to fix this... it's most likely
related to our new zend_strtod functions.
Previous Comments:
------------------------------------------------------------------------
[2005-01-12 03:39:12] charlesb at ekit-inc dot com
Description:
------------
Basically we're seeing long floats being given a string value of
-Infinity, even if we explicitly cast the variable. Python can handle
these vars no problem, don't see why PHP can't?
Thanks
Reproduce code:
---------------
<?php
$a = '6.48261999999999982691178956883959472179';
$c = (double) $a;
$b = sprintf("%0.2f", $c);
print $c.' '.$b;
?>
Expected result:
----------------
6.48261999999999982691178956883959472179 6.48
Actual result:
--------------
-Infinity -0N
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31504&edit=1