← power operator page · numeric/power/sc_sc/integer_operands

Integer operands 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

power of two integers: power(SC_1, SC_2) with SC_1 = 5 and SC_2 = 2.

Manual:

Power: "power ( 5, 2 ) gives 25", and "The result has type number."

Expected:

SC_r = 25.0, a Number although both operands are Integers.

script.vtl ⇩

SC_r := power(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": "Number",
      "value": "25.000000"
    }
  ]
}