[
  {
    "id": "0032-conditionals:001:simpleIf",
    "expression": "if bool then num+10 else num-10",
    "expected": 110.0,
    "expected_type": "number",
    "comparison": "f64_epsilon",
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
    "coerce_to": "number",
    "context": {
      "bool": true,
      "num": 100.0
    },
    "epsilon": 1e-08
  },
  {
    "id": "0032-conditionals:002:simpleIf",
    "expression": "if bool then num+10 else num-10",
    "expected": 90.0,
    "expected_type": "number",
    "comparison": "f64_epsilon",
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
    "coerce_to": "number",
    "context": {
      "bool": false,
      "num": 100.0
    },
    "epsilon": 1e-08
  },
  {
    "id": "0032-conditionals:003:simpleIf",
    "expression": "if bool then num+10 else num-10",
    "expected": 90.0,
    "expected_type": "number",
    "comparison": "f64_epsilon",
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
    "coerce_to": "number",
    "context": {
      "bool": null,
      "num": 100.0
    },
    "epsilon": 1e-08
  },
  {
    "id": "0032-conditionals:004:conditionWithFunctions",
    "expression": "if aDate > date(\"2017-01-01\") then substring before(aString, \" \") else substring after(aString, \" \")",
    "expected": "Hello",
    "expected_type": "string",
    "comparison": "exact",
    "deviation": null,
    "coerce_to": "string",
    "context": {
      "aDate": {
        "@type": "date",
        "@value": "2017-01-02"
      },
      "aString": "Hello World"
    }
  },
  {
    "id": "0032-conditionals:005:conditionWithFunctions",
    "expression": "if aDate > date(\"2017-01-01\") then substring before(aString, \" \") else substring after(aString, \" \")",
    "expected": "World",
    "expected_type": "string",
    "comparison": "exact",
    "deviation": null,
    "coerce_to": "string",
    "context": {
      "aDate": {
        "@type": "date",
        "@value": "2017-01-01"
      },
      "aString": "Hello World"
    }
  },
  {
    "id": "0032-conditionals:006:conditionWithFunctions",
    "expression": "if aDate > date(\"2017-01-01\") then substring before(aString, \" \") else substring after(aString, \" \")",
    "expected": "World",
    "expected_type": "string",
    "comparison": "exact",
    "deviation": null,
    "coerce_to": "string",
    "context": {
      "aDate": null,
      "aString": "Hello World"
    }
  }
]
