calculate
Safely evaluate arithmetic expressions with +, -, *, /, //, %, **, and parentheses. Returns precise results without enabling function calls, variables, or imports.
Instructions
Safely evaluate a simple arithmetic expression and return the result.
Supported: +, -, *, /, //, %, ** and parentheses. No function calls, variables, or imports are allowed.
Examples: "2 + 2" → 4.0 "10 / 3" → 3.3333... "(3 + 4) * 2" → 14.0 "2 ** 8" → 256.0
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |