ID: 36849
User updated by: esri at godseyfamily dot com
Reported By: esri at godseyfamily dot com
Status: Open
Bug Type: Feature/Change Request
Operating System: Liinux
PHP Version: 5.1.2
New Comment:
$num = 0x3F800000;
printf("%f",$num);
I would expect a return value of:
1.00000
What I am getting is the integer value:
1065353216.000000
Previous Comments:
------------------------------------------------------------------------
[2006-03-24 21:17:29] esri at godseyfamily dot com
Description:
------------
Would simply like to input a hex value and get the float of it back.
The settype of course does not work, or any kind of casting. A
function that parses the binary string introduces a huge amount of
overhead when I do 1024 of these values in a row. I would think that
any programming language would have this basic capability. I'm getting
raw data, and a data type that it needs to be converted to.
I checked and didn't see this requested, though I'm sure it has been.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36849&edit=1