sqrt

xod/math/sqrt

Computes the square root of an input value.
sqrt
@/sqrt
Computes the square root of an input value.
INnumber
sqrt
OUT
IN
OUTnumber

C++ implementation

#pragma XOD dirtieness disable

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

Tabular tests

INOUT
00
11
21.4142~
2.251.5
42
164
-1NaN
-4NaN
NaNNaN
InfInf
-InfNaN