calculate
Evaluate numeric arithmetic expressions using +, -, *, /, //, %, **, and parentheses. Get precise results without relying on manual calculation.
Instructions
Evaluate a numeric arithmetic expression and return the result.
Supports +, -, *, /, //, %, ** and parentheses. Use this for any arithmetic instead of computing it yourself — language models are unreliable at multi-digit math.
Args: expression: A numeric expression, e.g. "2 * (3 + 4) / 7".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |