up previous next
Isqrt

computes the (truncated) square root of an integer

Syntax
Isqrt(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
Isqrt(16);
4
-------------------------------
Isqrt(99);
9
-------------------------------
Isqrt(-1);
ERROR: Expected non-negative INT
CONTEXT: Isqrt(-1)
-------------------------------