预订演示
前页 后页

lsqrt

Integer square root.

SYNOPSIS:

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

DESCRIPTION:
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.

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