function complexErr () {
    throw new Error(
      'Complex number not supported in function nthRoot. Use nthRoots instead.')
  }
Calculate the nth root of a value.
The principal nth root of a positive real number A, is the positive real
solution of the equation

    x^root = A

For matrices, the function is evaluated element wise.

Syntax:

    math.nthRoot(a)
    math.nthRoot(a, root)

Examples:

    math.nthRoot(9, 2)    // returns 3 (since 3^2 == 9)
    math.sqrt(9)          // returns 3 (since 3^2 == 9)
    math.nthRoot(64, 3)   // returns 4 (since 4^3 == 64)

See also:

    sqrt, pow

@param {number | BigNumber | Array | Matrix | Complex} a
             Value for which to calculate the nth root
@param {number | BigNumber} [root=2]    The root.
@return {number | Complex | Array | Matrix} Returns the nth root of `a`