#29874 [NEW]: Bitwise right shift operator produces incorrect result.
| From: | binhqx at mac dot com | Date: | Sat, 28 Aug 2004 04:27:43 +0000 |
| Subject: | #29874 [NEW]: Bitwise right shift operator produces incorrect result. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-65370@lists.php.net to get a copy of this message | ||
From: binhqx at mac dot com
Operating system: OS X Server 10.3 (Darwin 7.5.0)
PHP version: Irrelevant
PHP Bug Type: *Math Functions
Bug description: Bitwise right shift operator produces incorrect result.
Description:
------------
Bitwise right shift operator produces incorrect result
when applied to a double in all version of PHP on OS X.
During a bitwise right shift, the php processor casts
the operand
Reproduce code:
---------------
$operand = 8726521066;
echo ($operand >> 10);
Expected result:
----------------
133385
Actual result:
--------------
-1
--
Edit bug report at http://bugs.php.net/?id=29874&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29874&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29874&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29874&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=29874&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29874&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29874&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29874&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29874&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29874&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29874&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29874&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29874&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29874&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29874&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29874&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29874&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29874&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29874&r=float