gamma

rustemb/extra-functions/gamma

Gamma function. (Г(n))
gamma
@/gamma
Gamma function. (Г(n))
INnumber
gamma
IN
OUT
OUTnumber
To use the node in your project you should have the rustemb/extra-functions library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    float inValue = getValue<input_IN>(ctx);
    emitValue<output_OUT>(ctx, tgamma(inValue));
}

Tabular tests

INOUT
0Inf
11
21
0.51.77245385090551602