Lines Matching refs:shift

1492         for ($shift = 0; !($msb & self::$msb); ++$shift) {
1495 $x->_lshift($shift);
1496 $y->_lshift($shift);
1582 $x->_rshift($shift);
1588 $y->_rshift($shift);
2958 * @param int $shift
2963 function bitwise_rightShift($shift) argument
2975 $temp->value = gmp_div_q($this->value, gmp_pow($two, $shift));
2979 $temp->value = bcdiv($this->value, bcpow('2', $shift, 0), 0);
2985 $temp->_rshift($shift);
2996 * @param int $shift
3001 function bitwise_leftShift($shift) argument
3013 $temp->value = gmp_mul($this->value, gmp_pow($two, $shift));
3017 $temp->value = bcmul($this->value, bcpow('2', $shift, 0), 0);
3023 $temp->_lshift($shift);
3034 * @param int $shift
3038 function bitwise_leftRotate($shift) argument
3058 if ($shift < 0) {
3059 $shift+= $precision;
3061 $shift%= $precision;
3063 if (!$shift) {
3067 $left = $this->bitwise_leftShift($shift);
3069 $right = $this->bitwise_rightShift($precision - $shift);
3079 * @param int $shift
3083 function bitwise_rightRotate($shift) argument
3085 return $this->bitwise_leftRotate(-$shift);
3491 * @param int $shift
3494 function _lshift($shift) argument
3496 if ($shift == 0) {
3500 $num_digits = (int) ($shift / self::$base);
3501 $shift %= self::$base;
3502 $shift = 1 << $shift;
3507 $temp = $this->value[$i] * $shift + $carry;
3526 * @param int $shift
3529 function _rshift($shift) argument
3531 if ($shift == 0) {
3535 $num_digits = (int) ($shift / self::$base);
3536 $shift %= self::$base;
3537 $carry_shift = self::$base - $shift;
3538 $carry_mask = (1 << $shift) - 1;
3547 $temp = $this->value[$i] >> $shift | $carry;
3653 * @param int $shift
3657 function _base256_lshift(&$x, $shift) argument
3659 if ($shift == 0) {
3663 $num_bytes = $shift >> 3; // eg. floor($shift/8)
3664 $shift &= 7; // eg. $shift % 8
3668 $temp = ord($x[$i]) << $shift | $carry;
3682 * @param int $shift
3686 function _base256_rshift(&$x, $shift) argument
3688 if ($shift == 0) {
3693 $num_bytes = $shift >> 3; // eg. floor($shift/8)
3694 $shift &= 7; // eg. $shift % 8
3704 $carry_shift = 8 - $shift;
3706 $temp = (ord($x[$i]) >> $shift) | $carry;