pow method
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);
}