Home Man
Search
Today's Posts
Register

Linux & Unix Commands - Search Man Pages

NetBSD 6.1.5 - man page for ilog2 (netbsd section 3)

ILOG2(3)			   BSD Library Functions Manual 			 ILOG2(3)

NAME
     ilog2 -- integer logarithm

SYNOPSIS
     #include <sys/bitops.h>

     size
     ilog2(size x);

DESCRIPTION
     The ilog2() macro returns an integer (binary) logarithm of x.  It is the logarithm for base
     2; the binary logarithm of x is the power to which the number 2 must be raised to obtain the
     value x.

     The type of the input parameter should be either uint32_t or uint64_t.

ERRORS
     A value -1 is returned on error.

SEE ALSO
     bitops(3), ilogb(3), log2(3), imax(9), powerof2(9)

HISTORY
     The ilog2() macro first appeared in NetBSD 5.0.

BSD					   May 10, 2011 				      BSD


All times are GMT -4. The time now is 11:00 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password