calculate
Evaluate arithmetic expressions with exact arithmetic, supporting functions like sqrt and sin, and avoiding float64 errors and unsafe eval.
Instructions
Evaluate an arithmetic expression and return the result.
Args:
expression: The expression to evaluate, for example "2 + 3 * (4 - 1)",
"sqrt(16) + sin(pi/2)" or "123456789 * 987654321". `^` is accepted
as a power operator; `×` and `·` as multiply, `÷` as divide, and
`−` (U+2212) as minus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |