OpenBSD manual page server

Manual Page Search Parameters

ILOGB(3) Library Functions Manual ILOGB(3)

ilogb, ilogbf, ilogblextract exponent

#include <math.h>

ilogb(double x);

ilogbf(float x);

ilogbl(long double x);

() returns x's exponent n, in integer format. ilogb(±infinity) returns INT_MAX, ilogb(NaN) returns FP_ILOGBNAN and ilogb(0) returns FP_ILOGB0. The () function is a single precision version of ilogb(). The () function is an extended precision version of ilogb().

ffs(3), frexp(3)

IEEE Std 754-1985

The ilogb, ilogbf and ilogbl functions appeared in 4.3BSD, NetBSD 1.1 and OpenBSD 4.5, respectively.

October 31, 2020 OpenBSD-current