ILOGB(3)

NAME
1.28 `ilogb', `ilogbf'--get exponent of floating-point number

SYNOPSIS
     #include <math.h>
     int ilogb(double VAL);
     int ilogbf(float VAL);

DESCRIPTION
All nonzero, normal numbers can be described as M * 2**P. `ilogb' and `ilogbf' examine the argument VAL, and return P. The functions `frexp' and `frexpf' are similar to `ilogb' and `ilogbf', but also return M.

RETURNS
`ilogb' and `ilogbf' return the power of two used to form the floating-point argument. If VAL is `0', they return `FP_ILOGB0'. If VAL is infinite, they return `INT_MAX'. If VAL is NaN, they return `FP_ILOGBNAN'. (`FP_ILOGB0' and `FP_ILOGBNAN' are defined in math.h, but in turn are defined as INT_MIN or INT_MAX from limits.h. The value of FP_ILOGB0 may be either INT_MIN or -INT_MAX. The value of FP_ILOGBNAN may be either INT_MAX or INT_MIN.)

PORTABILITY
C99, POSIX

SEE ALSO
ilogb is part of the library. The full documentation for is maintained as a Texinfo manual. If info and are properly installed at your site, the command

    info

will give you access to the complete manual.