← modulo operator page · numeric/modulo/sc_sc/positive_operands

Positive operands 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

the remainder of two positive integers: mod(SC_1, SC_2) with SC_1 = 5 and SC_2 = 2.

Manual:

Modulo: "mod ( 5, 2 ) gives 1".

Expected:

SC_r = 1, an Integer.

script.vtl ⇩

SC_r := mod(SC_1, SC_2);

input/scalars.csv ⇩

SC_1SC_2
52

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Integer"},
    {"name": "SC_2", "type": "Integer"}
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {
      "name": "SC_r",
      "type": "Integer",
      "value": "1"
    }
  ]
}