up previous next
FloorRoot    --    integer part of r-th root of an integer


Syntax
FloorRoot(N: INT, R: INT): INT

Description
This function computes the R -th root of the non-negative integer N . If the argument is not a perfect R -th power it returns the integer part of the root (the floor of the real root).

Example
/**/  FloorRoot(25, 2);
5
/**/  FloorRoot(99, 3);
4

See Also