Class Power

All Implemented Interfaces:
Expression

public final class Power extends Operation
  • Constructor Details

  • Method Details

    • op

      public Real op(Real r1, Real r2)
      The actual exponentiation of two Reals
      Specified by:
      op in class Operation
      Parameters:
      r1 - the base
      r2 - the exponent
      Returns:
      the result of the operation
    • toRational

      public static BigInteger[] toRational(BigDecimal decimal)
    • op

      public Real op(IntegerAtom i1, IntegerAtom i2)
      The actual exponentiation of two Integers.
      Specified by:
      op in class Operation
      Parameters:
      i1 - the base
      i2 - the exponent
      Returns:
      the result of the operation
    • op

      public Complex op(Complex c1, Complex c2)
      The exponentiation of complex numbers
      Specified by:
      op in class Operation
      Parameters:
      c1 - the base
      c2 - the exponent
      Returns:
      result of computing the binary operation
      Throws:
      ArithmeticException - since the exponentiation of complex numbers is impossible
    • op

      public Real op(Rationnal q1, Rationnal q2)
      The actual exponentiation of two rational numbers
      Specified by:
      op in class Operation
      Parameters:
      q1 - the base
      q2 - the exponent
      Returns:
      the result of the exponentiation