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

Integer operands 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

log of two integers: log(SC_1, SC_2) with SC_1 = 1024 and SC_2 = 2.

Manual:

Logarithm: "log ( 1024, 2 ) gives 10", and "The result has type number."

Expected:

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

script.vtl ⇩

SC_r := log(SC_1, SC_2);

input/scalars.csv ⇩

SC_1SC_2
10242

input/scalars.json ⇩

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

expected/scalars.json ⇩

{
  "scalars": [
    {
      "name": "SC_r",
      "type": "Number",
      "value": "10.000000"
    }
  ]
}