calc
Evaluates exact arithmetic expressions with fractions, big integers, variables, functions, and percentages to prevent rounding and mental-math errors.
Instructions
Exact calculator; use instead of mental math. Fractions and big integers exact (0.1+0.2=0.3, 100!), floats only for irrational results (marked). Ops + - * / ^ % (mod; postfix = percent: 200*19%) ! ; implicit 2pi; 0xff 1e3 1_000; vars "r=2; pi r^2", ans. Fns sqrt cbrt root(x,n) abs sign floor ceil trunc round(x,d) min max mod gcd lcm fact nCr nPr exp ln log(x,base=10) log2 sin cos tan asin acos atan atan2 sinh cosh tanh hypot; consts pi e tau phi deg (sin(30deg)).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>"
},
"name": "calc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| digits | No | significant digits, default 30 | |
| expression | Yes |