Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next


Integer square root.


long x, y;
long lsqrt();
y = lsqrt(x);

Returns a long integer square root of the long integer argument. The computation is by binary long division. The largest possible result is lsqrt(2,147,483,647) = 46341.
If x < 0, the square root of |x| is returned, and an error message is available.

An extra, roundoff, bit is computed; hence the result is the nearest integer to the actual square root.