Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ilogb, ilogbf, ilogbl - get exponent part of floating-point number

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

int ilogb(double x);
C11
int ilogbf(float x);
int ilogbl(long double x); (End) 

Description

These functions return the exponent part of x. In form, for all xs not equal to zero, the return value is the integral, signed part of logr |x|, where r is the base of the floating-point arithmetic of the processor (in BS2000, r = 16).

The ilogb(x) function call is equivalent to the (int)logb(x) call.

Return val.

Exponent part of x


if successful.                         

INT_MIN

if x = 0.0.

See also

logb(), math.h.