ilogb

Returns the 10-exponent of x as a signed integral value..

@IEEECompliant("logB", 17)
int
ilogb
(
D
)
(
auto const ref D x
)

Throws

InvalidOperationException if x is NaN, infinity or 0

Special values

xilogb(x)
NaNint.min
±∞int min + 1
±0.0int.min + 2
±1.00

Examples

assert (ilogb(decimal32(1234)) == 3);

Meta