calculate
Evaluate arithmetic or scientific expressions safely, with unit-aware calculations, variable support, and exact high-precision numeric results. Set output and angle units for dimensional analysis.
Instructions
Evaluate one arithmetic/scientific expression safely. Use explicit * and variables.
For dimensional work, pass original unit-bearing variable strings (for example 12.4 kN*m)
and always set output_unit; never add manual conversion factors to the expression. Returns
exact and high-precision numeric forms when unitless.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| precision | No | ||
| variables | No | ||
| angle_unit | No | radians | |
| expression | Yes | ||
| output_unit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Output unit, when dimensionful. | |
| exact | No | Exact symbolic result when available. | |
| result | Yes | Primary result; strings preserve mathematical precision. | |
| details | No | ||
| warnings | No | ||
| operation | Yes | Operation actually performed. | |
| approximate | No | Numerical approximation at the requested precision. | |
| normalized_input | No | Canonical input used by the computation engine. |