Shunting-Yard Algebraic Math, Financial IRR/NPV & Descriptive Stats Solver
evaluate_deterministic_mathStrict Shunting-Yard AST arithmetic parser with zero eval() or dynamic code execution: evaluates algebraic formulas and computes exact financial NPV, Newton-Raphson IRR, Kelly criterion, and dataset stats. Use when computing exact arithmetic formulas, cashflow NPV/IRR, or descriptive statistics without LLM floating-point guesswork; for running two-sample A/B hypothesis tests, use evaluate_ab_statistical_significance instead. Read-only edge call (32 KB, 60 RPM): accepts 'math_formula' ('precision_digits' defaults to '2_decimals'), uses '?demo=true' or L402 (40 sats); HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | No | Algebraic or scientific formula to evaluate (e.g. '(125000 * (1 + 0.0725/12)^60) - 98450.50'). | |
| precision_digits | No | Decimal rounding precision for returned numbers; defaults to '8_decimals' when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | Evaluated mathematical expression. | |
| exact_result | Yes | Deterministic floating-point result of the expression. | |
| dataset_statistics | Yes | Optional count, mean, median, std_dev, min, and max when a dataset array is supplied. | |
| financial_analysis | Yes | Optional NPV, Newton-Raphson IRR, and Kelly fraction when financial parameters are supplied. |