operator / method

BigRational operator /(
  1. BigRational other
)

Divides this BigRational by the given BigRational and returns the result.

other The BigRational to divide by. returns A new BigRational representing the quotient of this BigRational and the given BigRational.

Implementation

BigRational operator /(BigRational other) {
  final BigInt resultNumerator = numerator * other.denominator;
  final BigInt resultDenominator = denominator * other.numerator;

  return _reduce(resultNumerator, resultDenominator);
}