Lines Matching refs:y_value

226      * @param array $y_value
230 protected static function addHelper(array $x_value, $x_negative, array $y_value, $y_negative) argument
233 $y_size = count($y_value);
237 self::VALUE => $y_value,
249 if ($x_value == $y_value) {
256 $temp = self::subtractHelper($x_value, false, $y_value, false);
257 $temp[self::SIGN] = self::compareHelper($x_value, false, $y_value, false) > 0 ?
265 $value = $y_value;
276 … $sum = ($x_value[$j] + $y_value[$j]) * static::BASE_FULL + $x_value[$i] + $y_value[$i] + $carry;
287 $sum = $x_value[$i] + $y_value[$i] + $carry;
311 * @param array $y_value
315 public static function subtractHelper(array $x_value, $x_negative, array $y_value, $y_negative) argument
318 $y_size = count($y_value);
322 self::VALUE => $y_value,
334 $temp = self::addHelper($x_value, false, $y_value, false);
340 $diff = self::compareHelper($x_value, $x_negative, $y_value, $y_negative);
352 $x_value = $y_value;
353 $y_value = $temp;
358 $y_size = count($y_value);
365 … $sum = ($x_value[$j] - $y_value[$j]) * static::BASE_FULL + $x_value[$i] - $y_value[$i] - $carry;
377 $sum = $x_value[$i] - $y_value[$i] - $carry;
401 * @param array $y_value
405 … protected static function multiplyHelper(array $x_value, $x_negative, array $y_value, $y_negative) argument
415 $y_length = count($y_value);
426 self::trim(self::regularMultiply($x_value, $y_value)) :
427 self::trim(self::karatsuba($x_value, $y_value)),
439 * @param array $y_value
442 private static function karatsuba(array $x_value, array $y_value) argument
444 $m = min(count($x_value) >> 1, count($y_value) >> 1);
447 return self::regularMultiply($x_value, $y_value);
452 $y1 = array_slice($y_value, $m);
453 $y0 = array_slice($y_value, 0, $m);
479 * @param array $y_value
482 protected static function regularMultiply(array $x_value, array $y_value) argument
485 $y_length = count($y_value);
501 $temp = $x_value[$j] * $y_value[0] + $carry; // $product_value[$k] == 0
514 $temp = $product_value[$k] + $x_value[$j] * $y_value[$i] + $carry;
581 $y_value = &$y->value;
605 $temp_value = array_merge(self::array_repeat(0, $x_max - $y_max), $y_value);
622 $y_value[$y_max],
623 ($y_max > 0) ? $y_value[$y_max - 1] : 0
661 $temp_value = array_merge($adjust, $y_value);
786 * @param array $y_value
791 … protected static function compareHelper(array $x_value, $x_negative, array $y_value, $y_negative) argument
799 if (count($x_value) != count($y_value)) {
800 return (count($x_value) > count($y_value)) ? $result : -$result;
802 $size = max(count($x_value), count($y_value));
805 $y_value = array_pad($y_value, $size, 0);
808 if ($x_value[$i] != $y_value[$i]) {
809 return ($x_value[$i] > $y_value[$i]) ? $result : -$result;