pow method

Number pow(
  1. num exponent
)

Find the square root of the number

Implementation

Number pow(num exponent) {
  if (this is Integer ||
      this is Precision ||
      this is Double ||
      this is Real) {
    return numToNumber(math.pow(numberToNum(this), exponent));
  } else if (this is Imaginary) {
    return Complex.num(Integer.zero, this as Imaginary).pow(exponent);
  } else {
    return (this as Complex).pow(exponent);
  }
}