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,
although both 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.
COMPLIANCE
Neither ilogb
nor ilogbf
is required by ANSI C or by the System
V Interface Definition (Issue 2).