Evaluar expresión matemática
expression-evaluateEvalúa una expresión matemática con un analizador propio (sin eval): operadores, funciones, constantes y variables. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: realizar aritmética exacta de enteros grandes (bigint-calc). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Evaluates an arithmetic expression with its own parser (no eval): + − * / % ^ !, parentheses, implicit multiplication, functions (sqrt, sin, ln, log, min, max…), constants pi/e/tau/phi and named variables. When: a numeric result has to be exact or reproducible instead of estimated. Not for: computing the exact arbitrary-precision integer arithmetic (bigint-calc). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decimals | No | Round result to N decimals (integer; optional; default 12; min 0; max 15). | |
| variables | No | Variable values (object; optional; default {}). | |
| expression | Yes | Expression (string; required; at least 1 chars; up to 2000 chars). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | any JSON value |