evaluate
Compute the numeric value of a mathematical expression safely in a sandbox. Supports operators, constants, and functions like sqrt, sin, log, and factorial.
Instructions
Evaluate a mathematical expression and return its numeric value.
Supports + - * / // % **, parentheses, the constants pi, e,
tau and functions such as sqrt, sin, cos, log,
exp, factorial, gcd, hypot. Evaluation is sandboxed: no
Python eval is used and only whitelisted names are allowed.
Example: "sqrt(2) * sin(pi / 4)" -> 1.0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |