math_scientific_calculator
Evaluate scientific math expressions with trigonometry, logarithms, powers, and constants. Supports degrees or radians for trig functions.
Instructions
Scientific Calculator Expression Evaluator. Evaluate a single scientific math expression and return its numeric value, with support for trigonometry (sin, cos, tan, asin, acos, atan, atan2), logarithms (ln, log base 10, log2), exponent and power, square and cube root, abs, floor, ceil, round, factorial (n! or factorial), modulo (% or mod), the constants pi and e, and parentheses for grouping. The angleMode option selects whether trig functions read their argument in radians (default) or degrees. Uses a hand-rolled shunting-yard parser (no JavaScript eval and no dynamic code execution), so only the documented operators and functions run. Use this for general numeric expressions; use math_quadratic_solver to solve ax^2 + bx + c for roots, or math_statistics_calculator for descriptive statistics over a dataset. Runs locally on the expression you provide: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests per minute for anonymous callers). On success returns the original ex
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | Math expression to evaluate (max 1000 characters). Supports plus, minus, times, divide, modulo, power operators, the mod keyword, parentheses, factorial via bang or factorial(), functions (sin cos tan asin acos atan atan2 ln log log2 exp sqrt cbrt abs floor ceil round max min), constants pi and e, and scientific notation such as 1.5e10. Must not be blank. | |
| angleMode | No | Angle unit for trig and inverse-trig functions: rad treats arguments as radians, deg as degrees. Aliases radians and degrees are accepted. | rad |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | True when the expression evaluated successfully. | |
| result | No | The evaluation payload. |