# libm.info: ilogb

**Go forward to infinity**

**Go backward to hypot**

**Go up to Math**

**Go to the top op libm**

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

*Synopsis*
#include <math.h>
int ilogb(double VAL);
int ilogbf(float VAL);
*Description*
All non zero, 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 `- INT_MAX' (`INT_MAX' is
defined in limits.h). If VAL is infinite, or NaN, they return
`INT_MAX'.

*Portability*
Neither `ilogb' nor `ilogbf' is required by ANSI C or by the System V
Interface Definition (Issue 2).

Created Mon Nov 8 17:42:56 2004 on tillpc with info_to_html version 0.9.6.