calculate
Safely evaluate an arithmetic expression and return the exact result.
Supports +, -, *, /, //, %, ** (power), parentheses, the constants pi and e, and the functions sqrt(), abs(), round(). Does not execute arbitrary code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | An arithmetic expression, e.g. "(3 + 4) * 2 ** 5" or "sqrt(2) * pi". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||