← ln operator page · numeric/ln/sc/integer_operand

Integer operand 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

ln of an integer: ln(SC_1) with SC_1 = 148.

Manual:

Natural logarithm: "ln ( 148 ) gives 4.997...", and "The result has type number."

Expected:

SC_r = 4.997212 (ln 148 = ln 100 + ln 1.48 = 4.605170 + 0.392042), a Number although the operand is an Integer.

script.vtl ⇩

SC_r := ln(SC_1);

input/scalars.csv ⇩

SC_1
148

input/scalars.json ⇩

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

expected/scalars.json ⇩

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