ilogb

fnint ilogb(T)(const T x) if (isFloatingPoint!T) @trusted pure nothrow @nogc

Extracts the exponent of x as a signed integral value.

If x is not a special value, the result is the same as

cast(int) logb(x).
x ilogb(x) Range error?
0 FP_ILOGB0 yes
±∞ int.max no
NaN FP_ILOGBNAN no
fnint ilogb(T)(const T x) if (isIntegral!T && isUnsigned!T) @safe pure nothrow @nogc

ditto

fnint ilogb(T)(const T x) if (isIntegral!T && isSigned!T) @safe pure nothrow @nogc

ditto