| 1 | [ |
| 2 | { |
| 3 | "id": "0008-LX-arithmetic:001:payment", |
| 4 | "expression": "(loan.principal*loan.rate/12)/(1-(1+loan.rate/12)**-loan.termMonths)", |
| 5 | "expected": 2778.69354943277, |
| 6 | "expected_type": "number", |
| 7 | "comparison": "f64_epsilon", |
| 8 | "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.", |
| 9 | "coerce_to": "number", |
| 10 | "context": { |
| 11 | "loan": { |
| 12 | "principal": 600000.0, |
| 13 | "rate": 0.0375, |
| 14 | "termMonths": 360.0 |
| 15 | } |
| 16 | }, |
| 17 | "epsilon": 1e-08 |
| 18 | }, |
| 19 | { |
| 20 | "id": "0008-LX-arithmetic:002:payment", |
| 21 | "expression": "(loan.principal*loan.rate/12)/(1-(1+loan.rate/12)**-loan.termMonths)", |
| 22 | "expected": 562.707359373292, |
| 23 | "expected_type": "number", |
| 24 | "comparison": "f64_epsilon", |
| 25 | "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.", |
| 26 | "coerce_to": "number", |
| 27 | "context": { |
| 28 | "loan": { |
| 29 | "principal": 30000.0, |
| 30 | "rate": 0.0475, |
| 31 | "termMonths": 60.0 |
| 32 | } |
| 33 | }, |
| 34 | "epsilon": 1e-08 |
| 35 | }, |
| 36 | { |
| 37 | "id": "0008-LX-arithmetic:003:payment", |
| 38 | "expression": "(loan.principal*loan.rate/12)/(1-(1+loan.rate/12)**-loan.termMonths)", |
| 39 | "expected": 2861.03377700389, |
| 40 | "expected_type": "number", |
| 41 | "comparison": "f64_epsilon", |
| 42 | "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.", |
| 43 | "coerce_to": "number", |
| 44 | "context": { |
| 45 | "loan": { |
| 46 | "principal": 600000.0, |
| 47 | "rate": 0.0399, |
| 48 | "termMonths": 360.0 |
| 49 | } |
| 50 | }, |
| 51 | "epsilon": 1e-08 |
| 52 | } |
| 53 | ] |