Unit result check

unit-result-check · version 1.0.0 · Numbers & math · free, no key needed

Check a claimed converted value exactly or under declared rounding; returns the exact value and the claim error

Use when you need to: check converted value · verify unit conversion result · is this converted number right.

Decide before calling

Read the versioned contract and the supported scope below. Reuse unit-result-check@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 unit-result-check@1.0.0 for check converted value. 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:

{
  "units": [
    {
      "symbol": "m",
      "dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "factor": "1",
      "offset": "0"
    },
    {
      "symbol": "km",
      "dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "factor": "1000",
      "offset": "0"
    },
    {
      "symbol": "au",
      "dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "factor": "149597870700",
      "offset": "0"
    }
  ],
  "quantity_kind": "absolute",
  "value": "1",
  "from_unit": [
    {
      "unit": "au",
      "power": 1
    }
  ],
  "to_unit": [
    {
      "unit": "km",
      "power": 1
    }
  ],
  "claimed_value": "149600000",
  "rounding": {
    "method": "significant_digits",
    "digits": 4
  }
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "first_discrepancy": null,
    "exact_value": "149597870.7",
    "expected_value": "149600000",
    "difference": "2129.3",
    "reference_version": "jcgm-200-2012-vim3-si-brochure-9e-2019"
  }
}

How to call it

MCP

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

{
  "id": "unit-result-check",
  "version": "1.0.0",
  "input": {
    "units": [
      {
        "symbol": "m",
        "dimension": [
          1,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "factor": "1",
        "offset": "0"
      },
      {
        "symbol": "km",
        "dimension": [
          1,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "factor": "1000",
        "offset": "0"
      },
      {
        "symbol": "au",
        "dimension": [
          1,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "factor": "149597870700",
        "offset": "0"
      }
    ],
    "quantity_kind": "absolute",
    "value": "1",
    "from_unit": [
      {
        "unit": "au",
        "power": 1
      }
    ],
    "to_unit": [
      {
        "unit": "km",
        "power": 1
      }
    ],
    "claimed_value": "149600000",
    "rounding": {
      "method": "significant_digits",
      "digits": 4
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/unit-result-check/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"units":[{"symbol":"m","dimension":[1,0,0,0,0,0,0],"factor":"1","offset":"0"},{"symbol":"km","dimension":[1,0,0,0,0,0,0],"factor":"1000","offset":"0"},{"symbol":"au","dimension":[1,0,0,0,0,0,0],"factor":"149597870700","offset":"0"}],"quantity_kind":"absolute","value":"1","from_unit":[{"unit":"au","power":1}],"to_unit":[{"unit":"km","power":1}],"claimed_value":"149600000","rounding":{"method":"significant_digits","digits":4}}'

The machine-readable contract is at /v1/tools/unit-result-check/versions/1.0.0.

CLI

node cli.mjs run unit-result-check 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.