code: public Fraction pow(final int power) {
          if (power == 1) {
              return this;
          } else if (power == 0) {
              return ONE;
          } else if (power < 0) {
              if (power == Integer.MIN_VALUE) { // MIN_VALUE can't be negated.
                  return this.invert().pow(2).pow(-(power / 2));
              }
              return this.invert().pow(-power);
          } else {
              final Fraction f = this.multipliedBy(this);
              if (power % 2 == 0) { // if even...
                  return f.pow(power / 2);
              } else { // if odd...
                  return f.pow(power / 2).multipliedBy(this);
              }
          }
      }
docs: <p>
  Gets a fraction that is raised to the passed in power.
  </p>
  
  <p>
  The returned fraction is in reduced form.
  </p>
  
  @param power
  the power to raise the fraction to
  @return <code>this</code> if the power is one, <code>ONE</code> if the power is zero (even if the fraction equals
  ZERO) or a new fraction instance raised to the appropriate power
  @throws ArithmeticException
  if the resulting numerator or denominator exceeds <code>Integer.MAX_VALUE</code>