public Object power(Number d, Complex c) { Complex base = new Complex(d.doubleValue(), 0.0); Complex temp = base.power(c); if (temp.im() == 0) return new Double(temp.re()); else return temp; }
public Complex sub(Number d, Complex c) { return new Complex(d.doubleValue() - c.re(), -c.im()); }
public Complex sub(Complex c, Number d) { return new Complex(c.re() - d.doubleValue(), c.im()); }
public Complex sub(Complex c1, Complex c2) { return new Complex(c1.re() - c2.re(), c1.im() - c2.im()); }
public Object power(Complex c, Number d) { Complex temp = c.power(d.doubleValue()); if (temp.im() == 0) return new Double(temp.re()); else return temp; }
public Object power(Complex c1, Complex c2) { Complex temp = c1.power(c2); if (temp.im() == 0) return new Double(temp.re()); else return temp; }