log-e

xod/math/log-e

Computes natural logarithm of a number.
log-e
@/log-e
Computes natural logarithm of a number.
INnumber
log-e
IN
OUT
OUTnumber

C++ implementation

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        Number x = getValue<input_IN>(ctx);
        emitValue<output_OUT>(ctx, log(x));
    }
}

Tabular tests

INOUT
0-Inf
-1NaN
10
20.69315~
0.2-1.6094~
NaNNaN
InfInf
-InfNaN