function BigInteger::multipliedBy
Returns the product of this number and the given one.
Parameters
BigNumber|int|float|string $that The multiplier. Must be convertible to a BigInteger.:
Throws
MathException If the multiplier is not a valid number, or is not convertible to a BigInteger.
1 call to BigInteger::multipliedBy()
- BigInteger::shiftedLeft in vendor/
brick/ math/ src/ BigInteger.php - Returns the integer left shifted by a given number of bits.
File
-
vendor/
brick/ math/ src/ BigInteger.php, line 408
Class
- BigInteger
- An arbitrary-size integer.
Namespace
Brick\MathCode
public function multipliedBy(BigNumber|int|float|string $that) : BigInteger {
$that = BigInteger::of($that);
if ($that->value === '1') {
return $this;
}
if ($this->value === '1') {
return $that;
}
$value = Calculator::get()->mul($this->value, $that->value);
return new BigInteger($value);
}