Decimal expression evaluate

decimal-expression-evaluate · version 1.0.0 · Money & pricing · free, no key needed

Evaluate a decimal arithmetic expression exactly with variables, abs, min, max and round, rounding once at the end.

Use when you need to: evaluate a decimal expression exactly · calculator with round to 2 decimals · compute a formula with named variables exactly.

Decide before calling

Read the versioned contract and the supported scope below. Reuse decimal-expression-evaluate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use decimal-expression-evaluate@1.0.0 for evaluate a decimal expression exactly. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "expression": "0.1 + 0.2"
}

Response:

{
  "result": {
    "value": "0.3",
    "exact": true,
    "fraction": {
      "numerator": "3",
      "denominator": "10"
    }
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "decimal-expression-evaluate",
  "version": "1.0.0",
  "input": {
    "expression": "0.1 + 0.2"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/decimal-expression-evaluate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"expression":"0.1 + 0.2"}'

The machine-readable contract is at /v1/tools/decimal-expression-evaluate/versions/1.0.0.

CLI

node cli.mjs run decimal-expression-evaluate 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.