public BigRational pow(int exponent) {
		if (exponent == 0) {
			return ONE;
		}
		if (exponent == 1) {
			return this;
		}

		final BigInteger n;
		final BigInteger d;
		if (exponent > 0) {
			n = numerator.toBigInteger().pow(exponent);
			d = denominator.toBigInteger().pow(exponent);
		}
		else {
			n = denominator.toBigInteger().pow(-exponent);
			d = numerator.toBigInteger().pow(-exponent);
		}
		return valueOf(n, d);
	}
public BigRational pow ( int exponent ) { if ( exponent == 0 ) { return ONE ; } if ( exponent == 1 ) { return this ; } final BigInteger n ; final BigInteger d ; if ( exponent > 0 ) { n = numerator . toBigInteger ( ) . pow ( exponent ) ; d = denominator . toBigInteger ( ) . pow ( exponent ) ; } else { n = denominator . toBigInteger ( ) . pow ( - exponent ) ; d = numerator . toBigInteger ( ) . pow ( - exponent ) ; } return valueOf ( n , d ) ; }
Calculates this rational number to the power (x<sup>y</sup>) of the specified argument.

<p>The result has no loss of precision.</p>

@param exponent exponent to which this rational number is to be raised
@return the resulting rational number