Integer Maths Operations.






Misc >
Help >
FAQ >


Links >



Integer Maths Operations.


Functions

unsigned long lsqrt (unsigned long x)
unsigned long long lsqrt64 (unsigned long long x)

Function Documentation

unsigned long lsqrt ( unsigned long x )

Compute the square root of a number.

This function computes the square root of x using integer operations exclusively. It returns the integer that corresponds to sqrt(x).

This function operates on unsigned numbers and as such it always succeeds.

Returns:
the square root of x.
See also:
sqrt, lsqrt64

unsigned long long lsqrt64 ( unsigned long long x )

Compute the square root of a number.

This function computes the square root of x using integer operations exclusively. It returns the integer that corresponds to sqrt(x). lsqrt64 deals with 64-bit integers while lsqrt only handles 32-bit integers.

This function operates on unsigned numbers and as such it always succeeds.

Returns:
the square root of x.
See also:
sqrt, lsqrt

Copyright (C) 1999, 2000, 2001, 2002, 2003 Stéphane Carrez, France
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


AltStyle によって変換されたページ (->オリジナル) /