up previous next
FloorSqrt    --    (truncated) square root of an integer


Syntax
FloorSqrt(N: INT): INT

Description
This function computes the square root of an integer. If the argument is not a perfect square it returns the integer part of the square root.

Example
/**/  FloorSqrt(16);
4
/**/  FloorSqrt(99);
9
-- /**/  FloorSqrt(-1);  --> !!! ERROR !!! as expected: Value must be non-negative

See Also