Previous Up Next

5.9.4  n-th root: root

root takes two arguments: an integer n and a number a.
root returns the n-th root of a (i.e. a1/n). If a<0, the n-th root is a complex number of argument 2π/n.
Input:

root(3,2)

Output:

2^(1/3)

Input:

root(3,2.0)

Output:

1.259921049892

Input:

root(3,sqrt(2))

Output:

2^(1/6)

Previous Up Next