multiplier-4dig

maksimbaturin/filament-counter/multiplier-4dig

This node multiplies all 4 digits (a*b*c*d).
multiplier-4dig
@/multiplier-4dig
This node multiplies all 4 digits (a*b*c*d).
IN1number
IN2number
IN3number
IN4number
multiplier-4dig
OUT
IN1
IN2
IN3
IN4
OUTnumber
To use the node in your project you should have the maksimbaturin/filament-counter 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

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        auto a = getValue<input_IN1>(ctx);
        auto b = getValue<input_IN2>(ctx);
        auto c = getValue<input_IN3>(ctx);
        auto d = getValue<input_IN4>(ctx);
        emitValue<output_OUT>(ctx, a * b * c * d);
    }
}

Tabular tests

INOUT
00
11
-1-1
28
-2-8
-73.5-397065.375
NaNNaN
InfInf
-Inf-Inf