Jarroba Tools · Calculation
v0.3.2Maths a model gets wrong: units with dimensional checking, equations, sheets.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
calc_eval
Evaluate a mathematical expression WITH UNITS and dimensional checking: "100 km/h to m/s", "5 km + 300 m", "70 kg to lbs", "det([[1,2],[3,4]])". Adding incompatible units is an error, not a silent number. Also flags results that are not finite (NaN, infinity).
| Parameter | Type | Description |
|---|---|---|
expression * | string | e.g. "100 km/h to m/s" or "sqrt(2)^2 + 2^10" |
calc_solve
Solve an equation in one unknown ("x^2 - 5x + 6 = 0", "sin(x) = 0.5") or a linear system (one equation per line). Says whether the answer is EXACT or an approximation, and over which interval it searched. Never invents a root it did not find.
| Parameter | Type | Description |
|---|---|---|
equations * | string | One equation, or several separated by newlines for a system |
from | number | Lower bound for the numeric search |
to | number | Upper bound for the numeric search |
unknown | string | Which variable to solve for (guessed if omitted) |
calc_sheet
Evaluate a multi-line calculation sheet and return the result of EVERY line. Variables carry downwards, units travel with the value, "#" starts a comment, "ans" is the previous result, and an error stays on its own line instead of killing the sheet. Declare currencies with "# @moneda USD = 1.08 EUR". Good for checking a quote or a budget line by line.
| Parameter | Type | Description |
|---|---|---|
sheet * | string | One expression per line, e.g. "width = 3.5 m height = 2.4 m area = width * height" |
as_markdown | boolean | Also return the sheet as a Markdown table |
calc_derive
Differentiate an expression symbolically, exactly: "x^3 + 2x", "sin(x)*cos(x)", "x^x". Keeps units, so d/dx (3 m * x) is "3 m" and not 3. Can take higher-order derivatives and evaluate the result at a point. Says which name it read as a unit, and refuses to answer "0" when the variable is not in the expression.
| Parameter | Type | Description |
|---|---|---|
expression * | string | e.g. "x^3 + 2x" or "9.8 m/s^2 * t^2 / 2" |
at | number | Also evaluate the derivative at this value of the variable |
order | integer | 1 = first derivative, 2 = second… up to 4 |
variable | string | Differentiate with respect to this (guessed if omitted) |
calc_steps
Show the WORKED STEPS of a calculation, verified step by step: a linear or quadratic equation, a derivative (naming which rule applies), or Gaussian elimination on a linear system row by row. Each step comes with the name of the rule used. When it cannot explain a case it says so (covered: false) instead of inventing a plausible-looking derivation — useful when you have to show your work to a person.
| Parameter | Type | Description |
|---|---|---|
input * | string | An equation ("2x + 6 = 0"), an expression to differentiate ("sin(x)*x^2"), or one equation per line for a system |
kind | string | What to explain |
variable | string | The unknown or the variable to differentiate by (guessed if omitted) |