use Brick\Math\Exception\DivisionByZeroException;
use Brick\Math\Exception\MathException;
use Brick\Math\Exception\NumberFormatException;
use Brick\Math\Exception\RoundingNecessaryException;
* An arbitrarily large rational number.
* This class is immutable.
final class BigRational extends BigNumber
* The denominator. Always strictly positive.
* Protected constructor. Use a factory method to obtain an instance.
* @param BigInteger $numerator The numerator.
* @param BigInteger $denominator The denominator.
* @param bool $checkDenominator Whether to check the denominator for negative and zero.
* @throws DivisionByZeroException If the denominator is zero.