@Override
public ANumber pow(ANumber exponent) {
if (exponent instanceof NaturalNumber) {
LongRationalNumber simplified = simplify();
LongRationalNumber pown =
(LongRationalNumber) new LongIntegerNumber(simplified.numerator).pow(exponent).toRational();
LongRationalNumber powd =
(LongRationalNumber) new LongIntegerNumber(simplified.denominator).pow(exponent).toRational();
return new LongRationalNumber(pown.numerator, powd.numerator);
} else {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}