code: public static void root(Complex_F64 a , int N , int k , Complex_F64 result )
      {
          double r = a.getMagnitude();
          double theta = Math.atan2(a.imaginary,a.real);
  
          r = Math.pow(r,1.0/N);
          theta = (theta + 2.0*k*UtilEjml.PI)/N;
  
          result.real = r * Math.cos(theta);
          result.imaginary = r * Math.sin(theta);
      }
docs: Computes the N<sup>th</sup> root of a complex number.  There are
  N distinct N<sup>th</sup> roots.
  
  @param a Complex number
  @param N The root's magnitude
  @param k Specifies which root.  0 &le; k &lt; N
  @param result Computed root