Bug #11519 Updated: Problem with bitwise & operator and big integers
| From: | sniper@php.net | Date: | Sun, 17 Jun 2001 18:08:09 +0000 |
| Subject: | Bug #11519 Updated: Problem with bitwise & operator and big integers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56677@lists.php.net to get a copy of this message | ||
ID: 11519
Updated by: sniper
Reported By: Andreas.Schwarz@schwarzes.net
Old-Status: Open
Status: Bogus
Bug Type: *Math Functions
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
See this bug report for reason why this is bogus report:
http://www.php.net/bugs.php?id=7755&edit=1
Also I suggest you READ the instructions about submitting
bug reports BEFORE you submit one.
Previous Comments:
---------------------------------------------------------------------------
[2001-06-17 10:16:43] Andreas.Schwarz@schwarzes.net
If I use the bitwise "&" operator with an integer (bit 32 is set), the result
is wrong.
<?
/*
** result is wrong (1)*/
$a = 4294901760; /* 11111111111111110000000000000000 */
$b = 1; /* 00000000000000000000000000000001 */
$c = $a & $b;
printf("$c = $a & $b<BR>");
/*
** result is ok (0) */
$a = 2147450880; /* 1111111111111111000000000000000 */
$b = 1; /* 0000000000000000000000000000001 */
$c = $a & $b;
printf("$c = $a & $b<BR>");
?>
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11519&edit=2