log

Calculates the natural logarithm of logex.

@IEEECompliant("log", 42)
D
log
(
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
+∞+∞
e+1.0
< 0.0NaN

Examples

assert (log(decimal32.E) == 1);

Meta