cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern int ilogbf (float x); extern int ilogb (double x); extern int ilogbl (long double x); extern int ilogbw (__float80 x); extern int ilogbq (__float128 x); extern int ilogbll (long_long_double x); extern int ilogbdf (decimal_float x); extern int ilogbd (decimal_double x); extern int ilogbdl (decimal_long_double x); extern int ilogbdll (decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
For positive nonzero x, the result is a value that satisfies x = significand * base**(ilogb(x)), with 1 <= significand < base.
For example, in binary (base-2) arithmetic, ilogb(1.5) = 0, ilogb(2.5) = 1, and ilogb(10.5DD) = 3. In decimal arithmetic, ilogbd(1.5DD) = 0, ilogbd(2.5DD) = 0, and ilogbd(10.5DD) = 1. In hexadecimal arithmetic, ilogb(1.5) = 0, ilogb(2.5) = 0, ilogb(10.5) = 0, and ilogb(16.5) = 1.