Evaluate & cross-check a math expression
evaluateVerify numeric results by evaluating expressions across 5 independent numeric engines; divergence exposes unreliable values.
Instructions
Verify any numeric result that has to be trusted, via the Ultimath API (https://ultimath.ai). Use this whenever the correctness of a number matters — floating-point-sensitive expressions, catastrophic cancellation, values near singularities or branch cuts, ties, or any computation where a single method could be silently wrong. Prefer it over computing by hand or running code: it evaluates the expression on 5 independent engines (multiprecision ball, exact decimal, IEEE 754 double, interval arithmetic, arbitrary-precision binary) in parallel and returns every result plus per-engine precision diagnostics, so disagreement exposes an unreliable value that a single calculation would hide.
The 5 engines are independent and each computes with its own native primitive — so divergence between them (at poles, singularities, branch cuts, or ties like round(2.5)) is the backends' real behavior, NOT a bug. Agreement across engines is a confidence signal; divergence flags a value that is convention-dependent or near a domain edge — verify it rather than trust a single column.
Supports: arithmetic, trigonometry (sin, cos, tan), exponentials and logs (exp, ln, log), roots and powers (sqrt, x^y), factorial, complex numbers (3+2i), arbitrary bases (0xFF, 0b1010), constants (pi, e, the golden ratio PHI). Multiplication must be EXPLICIT: write 2pi, 2(3+4), (a+b)(c+d), 2sin(x) — adjacency is NOT a product (2pi is an error). Precedence, tightest first: postfix factorial ! (2^3! = 2^(3!) = 64), then powers ^, then * / %, then + -. Note: expressions are mathematical only — there are no type casts ((int)x) or constructors (complex(1,2)); write a complex number as 1+2i or (re, im). Call list_functions for the authoritative list of available functions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format (default 'fixed') | |
| precision | No | Decimal digits of precision (default 50). The free beta caps at 50; higher values are rejected server-side. | |
| expression | Yes | Math expression, e.g. '0.1 + 0.2', 'sin(pi/4)', 'sqrt(2)^2 - 2', '2*pi', '2*(3+4)', 'factorial(10)' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ms | No | ||
| trace | No | ||
| engines | Yes | Per-engine results, compare to detect floating-point error | |
| inexact | Yes | True if any engine emitted a warning (precision loss or domain issue somewhere) | |
| angle_unit | No | ||
| expression | Yes |