/// <summary> /// Power: complex base, complex exponent /// </summary> /// <param name="basis">basis</param> /// <param name="exponent">exponent</param> /// <returns>result of basis^exponent</returns> public static fcomplex Pow(fcomplex basis, fcomplex exponent) { fcomplex ret = ( basis.Log () * exponent ); return ret.Exp (); }
/// <summary> /// fcomplex power real exponent /// </summary> /// <param name="input">basis </param> /// <param name="exponent">exponent</param> /// <returns>new fcomplex number with result</returns> public static fcomplex Pow(fcomplex input, double exponent) { fcomplex ret = input.Log (); ret.imag *= (float) exponent; ret.real *= (float) exponent; return ret.Exp (); }