@param int $n

@return int
970338
private function fromZigZag($n)
    {
        if (PHP_INT_SIZE === 4) {
            $n = gmp_init($n, 10);
        }
        $result = ($n >> 1) ^ -($n & 1);
        if (PHP_INT_SIZE === 4) {
            $result = gmp_strval($result, 10);
        }

        return $result;
    }
947777
private function modNn(int $x) : int
    {
        while ($x >= $this->blockSize) {
            $x -= $this->blockSize;
            $x = ($x >> $this->symbolSize) + ($x & $this->blockSize);
        }

        return $x;
    }
465071
public function executeNone(string $query): int
  {
    $this->realQuery($query);

    $n = $this->mysqli->affected_rows;

    if ($this->mysqli->more_results()) $this->mysqli->next_result();

    return $n;
  }
274398
public function sqrt(string $n) : string
    {
        if ($n === '0') {
            return '0';
        }

        // initial approximation
        $x = \str_repeat('9', \intdiv(\strlen($n), 2) ?: 1);

        $decreased = false;

        for (;;) {
            $nx = $this->divQ($this->add($x, $this->divQ($n, $x)), '2');

            if ($x === $nx || $this->cmp($nx, $x) > 0 && $decreased) {
                break;
            }

            $decreased = $this->cmp($nx, $x) < 0;
            $x = $nx;
        }

        return $x;
    }
1069782
public static function number(float $n, int $precision = 0): string
    {
        return self::$locale->number(round($n, $precision));
    }
435321
protected function readBuffer($n)
    {
        $n = min($n, strlen($this->buffer) - $this->offset);
        if ($n === 0) {
            // substr('', 0, 0) => false, which screws up read loops that are
            // expecting non-blocking reads to return ''. This avoids that edge
            // case when the buffer is empty/used up.
            return '';
        }
        $block = substr($this->buffer, $this->offset, $n);
        $this->offset += $n;
        return $block;
    }
575903
public function getParent($n = null)
	{
		return ($n > 1) ? $this->parent->getParent(--$n) : $this->parent;
	}
885844
public function fib($n)
    {
        if ($n < 3) return 1;
        $k = $n / 2;
        $a = $this->fib($k + 1);
        $b = $this->fib($k);
        if ($n % 2 == 1) {
            return $a * $a + $b * $b;
        } else {
            return $b * (2 * $a - $b);
        }
    }
331101
public function first($n)
    {
        $first = '';

        if ($n > 0)
        {
            $first = UTF8::substr
            (
                $this->scalarString,
                0,
                $n,
                $this->encoding
            );
        }

        return $this->newSelf($first);
    }
778253
public function gcd( $m, $n )
	{
		if( $n != 0 )
			return NaturalNumbers::gcd( $n, $m % $n );
		else
			return $m;
	}
1007437
function nth(int $nth, int $offset = 0) {
        if($nth <= 0) {
            throw new \InvalidArgumentException('nth must be a non-zero positive integer');
        }
        
        $new = array();
        $size = \count($this->data);
        
        for($i = $offset; $i < $size; $i += $nth) {
            $new[] = $this->data[$i];
        }
        
        return (new self($new));
    }
177197
public function &offsetGet($n) {
        if(!$this->offsetExists($n)) {
            throw new IndexNotFoundException((string) $n);
        }
        return $this->data[$n];
    }
125928
public function addNumber($n)
    {
        $this->validateNumber($n);
        $this->value[] = $n;
        $this->components ++;
    }
1253286
public function allocateTo($n, $precision = self::PRECISION_CURRENCY)
    {
        if (!is_int($n)) {
            throw new Exception\InvalidArgumentException('Number of targets must be an integer');
        }

        return $this->allocate(array_fill(0, $n, 1), $precision);
    }
16493
public function limit(int $n): self
    {
        return new self(new Limit($this->getIterator(), 0, $n), $this->type);
    }
597676
public function forward($n)
    {
        $n = (int) $n;
        if (($this->position + $n) > $this->getLength()) {
            throw new \OutOfBoundsException(sprintf('No more bytes to read'));
        }

        $this->position += $n;
    }
1013691
public function pointN(int $n) : Point
    {
        if (! isset($this->points[$n - 1])) {
            throw new NoSuchGeometryException('There is no Point in this CircularString at index ' . $n);
        }

        return $this->points[$n - 1];
    }