up previous next
integer part of r-th root of an integer
iroot(N: INT, R: INT): INT |
This function computes the
R
-th root of the integer
N
. If the
argument is not a perfect
R
-th power it returns the integer part of the root.
/**/ iroot(25, 2);
5
/**/ iroot(99, 3);
4
/**/ iroot(-1, 3);
-1
|