Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both | z/OS V1R7 |
#define _XOPEN_SOURCE_EXTENDED 1
#include <math.h>
int ilogb(double x);
#define _ISOC99_SOURCE
#include <math.h>
int ilogbf(float x);
int ilogbl(long double x);
#define _TR1_C99
#include <math.h>
int ilogb(float x);
int ilogb(long double x);
Function | Hex | IEEE |
---|---|---|
ilogb | X | X |
ilogbf | X | X |
ilogbl | X | X |
If successful, the ilogb() functions return the unbiased exponent of x as an integer.
If x is 0, the value FP_ILOGB0 is returned.
if x is a NaN, ilogb() will return FP_ILOGBNAN
if x is infinity, ilogb() will return INT_MAX
If the correct value is greater than {INT_MAX}, {INT_MAX} is returned and a domain error occurs.
If the correct value is less than {INT_MIN}, {INT_MIN} is returned and a domain error occurs.