function _nthComplexRoots(a, root) {
  if (root < 0) throw new Error('Root must be greater than zero');
  if (root === 0) throw new Error('Root must be non-zero');
  if (root % 1 !== 0) throw new Error('Root must be an integer');
  if (a === 0 || a.abs() === 0) return [complex(0)];
  var aIsNumeric = typeof a === 'number';
  var offset; // determine the offset (argument of a)/(pi/2)

  if (aIsNumeric || a.re === 0 || a.im === 0) {
    if (aIsNumeric) {
      offset = 2 * +(a < 0); // numeric value on the real axis
    } else if (a.im === 0) {
      offset = 2 * +(a.re < 0); // complex value on the real axis
    } else {
      offset = 2 * +(a.im < 0) + 1; // complex value on the imaginary axis
    }
  }

  var arg = a.arg();
  var abs = a.abs();
  var roots = [];
  var r = Math.pow(abs, 1 / root);

  for (var k = 0; k < root; k++) {
    var halfPiFactor = (offset + 4 * k) / root;
    /**
     * If (offset + 4*k)/root is an integral multiple of pi/2
     * then we can produce a more exact result.
     */

    if (halfPiFactor === Math.round(halfPiFactor)) {
      roots.push(_calculateExactResult[halfPiFactor % 4](r));
      continue;
    }

    roots.push(complex({
      r: r,
      phi: (arg + 2 * Math.PI * k) / root
    }));
  }

  return roots;
}
Calculate the nth root of a Complex Number a using De Movire's Theorem.
@param  {Complex} a
@param  {number} root
@return {Array} array of n Complex Roots