ilogb

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).

Remarks: This function is consistent with IEEE754R, but it differs from the C function of the same name in the return value of infinity. (in C, ilogb(real.infinity)== int.max). Note that the special return values may all be equal.

Special Values
xilogb(x)Invalid?
0FP_ILOGB0yes
±∞FP_ILOGBINFINITYyes
NaNFP_ILOGBNANyes
int
ilogb
(
real x
)

Meta