pow method

BigRational pow(
  1. int n
)

Raises this BigRational to the power of n and returns the result as a BigRational.

n The exponent. Returns a new BigRational representing the result of raising this BigRational to the power of n.

Implementation

BigRational pow(int n) {
  final BigInt num = numerator.pow(n);
  final BigInt denom = denominator.pow(n);
  return _reduce(num, denom);
}