if (power < 0) { return getFraction((int) Math.pow(denominator, -power), (int) Math.pow(numerator, -power)); } return getFraction((int) Math.pow(numerator, power), (int) Math.pow(denominator, power));
    public Fraction pow(int power) {        if (power == 1) {            return this;        } else if (power == 0) {            return ONE;        } else {            double denominatorValue = Math.pow(denominator, power);            double numeratorValue = Math.pow(numerator, power);            if (numeratorValue > Integer.MAX_VALUE || denominatorValue > Integer.MAX_VALUE) {                throw new ArithmeticException("Integer overflow");            }            if (power < 0) {                return getFraction((int) Math.pow(denominator, -power),                     (int) Math.pow(numerator, -power));            }            return getFraction((int) Math.pow(numerator, power),                 (int) Math.pow(denominator, power));        }    }