Lines Matching refs:x

134     public function __construct($x = 0, $base = 10)  argument
145 if (empty($x) && (abs($base) != 256 || $x !== '0')) {
152 if ($base == -256 && (ord($x[0]) & 0x80)) {
153 $this->value = ~$x;
156 $this->value = $x;
169 if ($base > 0 && $x[0] == '-') {
171 $x = substr($x, 1);
174 $x = preg_replace('#^(?:0x)?([A-Fa-f0-9]*).*#', '$1', $x);
177 if ($base < 0 && hexdec($x[0]) >= 8) {
179 $x = Hex::encode(~Hex::decode($x));
182 $this->value = $x;
195 $this->value = preg_replace('#(?<!^)(?:-).*|(?<=^|-)0*|[^-0-9].*#', '', $x);
203 if ($base > 0 && $x[0] == '-') {
205 $x = substr($x, 1);
208 $x = preg_replace('#^([01]*).*#', '$1', $x);
210 $temp = new static(Strings::bits2bin($x), 128 * $base); // ie. either -16 or +16
334 $x = $x->compare(static::$zero[static::class]) < 0 ? $x->add($n) : $x;
336 …pare(static::$zero[static::class]) < 0 ? $this->normalize($n->subtract($x)) : $this->normalize($x);
504 * @param string $x
508 protected static function base256_lshift(&$x, $shift) argument
518 for ($i = strlen($x) - 1; $i >= 0; --$i) {
519 $temp = ord($x[$i]) << $shift | $carry;
520 $x[$i] = chr($temp);
524 $x = $carry . $x . str_repeat(chr(0), $num_bytes);
662 * @param Engine $x
668 protected static function slidingWindow(Engine $x, Engine $e, Engine $n, $class) argument
689 $powers[1] = static::prepareReduce($x->value, $n_value, $class);
787 $x = static::randomRange($min, $max);
789 return static::randomRangePrimeInner($x, $min, $max);
864 * @param Engine $x
869 protected static function randomRangePrimeInner(Engine $x, Engine $min, Engine $max) argument
875 $x->make_odd();
876 if ($x->compare($max) > 0) {
881 $x = clone $min;
882 $x->make_odd();
885 $initial_x = clone $x;
888 if ($x->isPrime()) {
889 return $x;
892 $x = $x->add(static::$two[static::class]);
894 if ($x->compare($max) > 0) {
895 $x = clone $min;
896 if ($x->equals(static::$two[static::class])) {
897 return $x;
899 $x->make_odd();
902 if ($x->equals($initial_x)) {
1230 * @param Engine $x
1233 protected function bitwiseAndHelper(Engine $x) argument
1236 $right = $x->toBytes(true);
1249 * @param Engine $x
1252 protected function bitwiseOrHelper(Engine $x) argument
1255 $right = $x->toBytes(true);
1268 * @param Engine $x
1271 protected function bitwiseXorHelper(Engine $x) argument
1274 $right = $x->toBytes(true);