ilogb
fn
int ilogb(T)(const T x) if (isFloatingPoint!T) @trusted pure nothrow @nogcExtracts 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 |
fn
int ilogb(T)(const T x) if (isIntegral!T && isUnsigned!T) @safe pure nothrow @nogcditto
fn
int ilogb(T)(const T x) if (isIntegral!T && isSigned!T) @safe pure nothrow @nogcditto