Divides the current value by a given number.

@param $number

@throws \Stillat\Common\Exceptions\Arithmetic\DivideByZeroException;
@return $this
438562
public function divide($number = null)
    {
        if ($number === null) {
            $this->internalSetOperationModeWithHistory('divide');
        } elseif ($number instanceof Closure) {
            $this->internalSetOperationModeWithHistory('divide');
            return $this->group($number);
        } else {
            $this->performOperationOnExpressionEngine('divide', $number);
        }

        return $this;
    }
850100
public function sub(...$numbers)
    {
        foreach ($numbers as $number) {
            $this->number = bcsub($this->number, static::validateInputNumber($number), $this->precision);
        }

        return $this;
    }
1248638
public function eq($number)
    {
        return (bool) (bccomp($this->number, static::validateInputNumber($number), $this->precision) === 0);
    }
767619
public function blockLimit($number = null)
    {
        $number = $number !== null ? intval($number) : $number;
        $this->_blockLimit = $number;

        return $this;
    }
555347
public function limit(int $number)
    {
        $instance = $this->limitStrategyInstance();

        $instance->limitStrategy()->limit($number);

        return $instance;
    }
49325
public function limit($number)
    {
        $this->iterator = Iterators::limit($this->iterator, $number);
        return $this;
    }
1240179
public function setNumber($number)
    {
        $this->number = $number;
        $this->factors = $this->getFactors($this->getNumber());
    }
1136086
public function setDivisibility($divisibility)
    {
        if (!is_integer($divisibility) || $divisibility < 0)
            $divisibility = 6; // default 6

        $this->divisibility = $divisibility;
        return $this;
    }
64621
protected function expectNumberNotZeroForDivision($number, $message = '')
    {
        $this->expectValidNumber($number, $message);
        if ($number == 0) {
            throw new DivideByZeroException($message);
        }
    }
485730
public static function fromString($number)
    {
        $decimalSeparatorPosition = strpos($number, '.');
        if ($decimalSeparatorPosition === false) {
            return new self($number, '');
        }

        return new self(
            substr($number, 0, $decimalSeparatorPosition),
            rtrim(substr($number, $decimalSeparatorPosition + 1), '0')
        );
    }
983653
public function toTheN($number)
    {
        for ($i = 1; $i <= $number; $i++) {
            $this->multiply($this->number);
        }

        return $this;
    }
470741
public static function fromFloat($number)
    {
        if (is_float($number) === false) {
            throw new \InvalidArgumentException('Floating point value expected');
        }

        return self::fromString(sprintf('%.14F', $number));
    }
772959
public function setNumTotal($total)
    {
        if (!is_numeric($total)) {
            throw new InvalidArgumentException(
                'Total Number must be numeric.'
            );
        }

        $total = (int)$total;
        if ($total < 0) {
            throw new InvalidArgumentException(
                'Total Number must be greater than zero.'
            );
        }

        $this->numTotal = $total;

        return $this;
    }
1069973
private function divideInt(int $int): Rational
    {
        $w = $this->whole;
        $n = $this->numerator;
        $d = $this->denominator;
        return new Rational(0, $w * $d + $n, $int * $d);
    }
1085916
public function withNumber($number)
    {
        $card = $this->with('number', $number);
        $card->detectBrand();
        $card->token = null;
        $card->bin = substr($number, 0, 6);

        return $card;
    }
953017
public function loadByShopgateOrderNumber($number)
    {
        $order = $this->_getResource()->getByOrderNumber($number);
        if (!empty($order)) {
            $this->setData($order);
        }

        return $this;
    }
758333
public function randomMutable(int $number = null): self
    {
        $this->generatorToArray();

        if (\count($this->array, \COUNT_NORMAL) === 0) {
            return static::create(
                [],
                $this->iteratorClass,
                false
            );
        }

        if ($number === null) {
            /** @noinspection NonSecureArrayRandUsageInspection */
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
            $this->array = $arrayRandValue;

            return $this;
        }

        /** @noinspection NonSecureShuffleUsageInspection */
        \shuffle($this->array);

        return $this->firstsMutable($number);
    }