Function reference · Math

nthroot

Returns the nth root, as the principal power x^(1/n).

For a negative number and an odd n, that is the principal complex root, not the real one. Use cbrt for the real cube root.

Notation

nthroot(x, n)

Write it in an expression: nerdamer('nthroot(81,4)'), or in the Playground.

nerdamer.nthroot

nerdamer.nthroot(x: ExpressionInput, n: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

The fourth root of 81.

nthroot(81,4)
// → 3
Open in Playground

A symbolic degree.

nthroot(x,n)
// → x^n^-1
Open in Playground

The principal cube root of -8 is complex.

evaluate(nthroot(-8,3))
// → 1+1.7320508075688772935*i
Open in Playground

← Back to Function reference