← abs operator page · numeric/abs/sc/negative_number

Negative number 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

abs of a negative Number: abs(SC_1) with SC_1 = -5.49.

Manual:

Absolute value: "abs ( -5.49 ) gives 5.49".

Expected:

SC_r = 5.49, a Number.

script.vtl ⇩

SC_r := abs(SC_1);

input/scalars.csv ⇩

SC_1
-5.49

input/scalars.json ⇩

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

expected/scalars.json ⇩

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