function BigInteger::quotient
Returns the quotient of the division of this number by the given one.
Parameters
BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger.:
Throws
DivisionByZeroException If the divisor is zero.
1 call to BigInteger::quotient()
- BigInteger::shiftedRight in vendor/
brick/ math/ src/ BigInteger.php - Returns the integer right shifted by a given number of bits.
File
-
vendor/
brick/ math/ src/ BigInteger.php, line 484
Class
- BigInteger
- An arbitrary-size integer.
Namespace
Brick\MathCode
public function quotient(BigNumber|int|float|string $that) : BigInteger {
$that = BigInteger::of($that);
if ($that->value === '1') {
return $this;
}
if ($that->value === '0') {
throw DivisionByZeroException::divisionByZero();
}
$quotient = Calculator::get()->divQ($this->value, $that->value);
return new BigInteger($quotient);
}