
isqrt - integer square root

Calling sequence:

isqrt(x)

Parameter:

x  --   an integer

Overloading:

all

Summary:

isqrt returns an integer approximation to the square root of x. The approximation
is exact for perfect squares, and the error is less than 1 otherwise. isqrt(x)
= trunc(sqrt(x)), if x ?= 0, isqrt(x) = trunc(sqrt(-x))*I, otherwise.

>>  isqrt( 5 );

     2

>>  isqrt( 99 );

     9

>>  isqrt( -4 );

      2*I

See also:  sqrt

