#37590 [Bgs->Opn]: Bit operators not responding equally
| From: | jesse at eonstreet dot com | Date: | Thu, 25 May 2006 13:28:31 +0000 |
| Subject: | #37590 [Bgs->Opn]: Bit operators not responding equally | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97598@lists.php.net to get a copy of this message | ||
ID: 37590
User updated by: jesse at eonstreet dot com
Reported By: jesse at eonstreet dot com
-Status: Bogus
+Status: Open
Bug Type: *Math Functions
Operating System: Windows Xp / FC 3
PHP Version: 5.1.4
New Comment:
Yes, they are dependent to a point. But in 5.0.4 they returned the
same end value.
Something has changed in 5.1.x that no longer produces the correct
value.
Previous Comments:
------------------------------------------------------------------------
[2006-05-25 13:17:54] tony2001@php.net
Bitwise operators are architecture dependent.
And -4738698913 is actually not an integer, but a float on 32bit
platform.
------------------------------------------------------------------------
[2006-05-25 13:08:07] jesse at eonstreet dot com
Description:
------------
** Sorry if I havfe put this in hte wrong category.
I have encountered a difference in the output of a bit operator
combination between windows and FC3.
The example below is part of the code that produces the Google Checksum
when submitting to get a page rank.
In Mozilla Javascript and windows Javascript and well as PHP 5.1.4 on
whindows XP the bit operation returns correclty but under linux there
is a difference
I don't no why.
Reproduce code:
---------------
<?
$a = -4738698913;
echo $a ^= 43814;
?>
Expected result:
----------------
In Windows the result is -443704711
In Linux FC3 the result is -2147439834
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37590&edit=1