log2

Calculates log2x.

@IEEECompliant("log2", 42)
D
log2
(
D
)
(
auto const ref D x
)

Throws

InvalidOperationExceptionx is signaling NaN or x < 0
DivisionByZerox is ±0.0
Underflowresult is too small to be represented
InexactExceptionthe result is inexact

Special values

xlog(x)
NaNNaN
±0.0-∞
-∞NaN
+∞+∞
+2.0+1.0
< 0.0NaN

Meta