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

Integer operand 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

sqrt of an integer that is a perfect square: sqrt(SC_1) with SC_1 = 25.

Manual:

Square root: "sqrt ( 25 ) gives 5", and "The result has type number."

Expected:

SC_r = 5.0, a Number although the operand is an Integer.

script.vtl ⇩

SC_r := sqrt(SC_1);

input/scalars.csv ⇩

SC_1
25

input/scalars.json ⇩

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

expected/scalars.json ⇩

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