I found that 00000000 hex was converting to 1.0 decimal. From the Wikipedia article on IEEE-754 floating point:
The true significand includes 23 fraction bits to the right of the binary point and an implicit leading bit (to the left of the binary point) with value 1 unless the exponent is stored with all zeros.
In hex2float32n, replace:
$intnumber=bindec("1".$binint);
with
if ($exp <> -127)
{ $intnumber=bindec("1".$binint); };
and then 00000000 works correctly without affecting "normal" numbers.
----
Server IP: 69.147.83.197
Probable Submitter: 173.79.55.208
----
Manual Page -- http://www.php.net/manual/en/language.types.float.php
Edit -- https://master.php.net/note/edit/102789
Del: integrated -- https://master.php.net/note/delete/102789/integrated
Del: useless -- https://master.php.net/note/delete/102789/useless
Del: bad code -- https://master.php.net/note/delete/102789/bad+code
Del: spam -- https://master.php.net/note/delete/102789/spam
Del: non-english -- https://master.php.net/note/delete/102789/non-english
Del: in docs -- https://master.php.net/note/delete/102789/in+docs
Del: other reasons-- https://master.php.net/note/delete/102789
Reject -- https://master.php.net/note/reject/102789
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.