Unit factor check

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

Check a claimed conversion factor and offset between two unit expressions using caller-defined exact unit definitions

Use when you need to: check unit conversion factor · verify conversion formula between units · is this unit factor correct.

Decide before calling

Read the versioned contract and the supported scope below. Reuse unit-factor-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-factor-check@1.0.0 for check unit conversion factor. 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": "s",
      "dimension": [
        0,
        0,
        1,
        0,
        0,
        0,
        0
      ],
      "factor": "1",
      "offset": "0"
    },
    {
      "symbol": "h",
      "dimension": [
        0,
        0,
        1,
        0,
        0,
        0,
        0
      ],
      "factor": "3600",
      "offset": "0"
    }
  ],
  "quantity_kind": "absolute",
  "from_unit": [
    {
      "unit": "km",
      "power": 1
    },
    {
      "unit": "h",
      "power": -1
    }
  ],
  "to_unit": [
    {
      "unit": "m",
      "power": 1
    },
    {
      "unit": "s",
      "power": -1
    }
  ],
  "claimed_factor": "5/18",
  "claimed_offset": "0"
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "first_discrepancy": null,
    "factor": "5/18",
    "offset": "0",
    "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-factor-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": "s",
        "dimension": [
          0,
          0,
          1,
          0,
          0,
          0,
          0
        ],
        "factor": "1",
        "offset": "0"
      },
      {
        "symbol": "h",
        "dimension": [
          0,
          0,
          1,
          0,
          0,
          0,
          0
        ],
        "factor": "3600",
        "offset": "0"
      }
    ],
    "quantity_kind": "absolute",
    "from_unit": [
      {
        "unit": "km",
        "power": 1
      },
      {
        "unit": "h",
        "power": -1
      }
    ],
    "to_unit": [
      {
        "unit": "m",
        "power": 1
      },
      {
        "unit": "s",
        "power": -1
      }
    ],
    "claimed_factor": "5/18",
    "claimed_offset": "0"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/unit-factor-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":"s","dimension":[0,0,1,0,0,0,0],"factor":"1","offset":"0"},{"symbol":"h","dimension":[0,0,1,0,0,0,0],"factor":"3600","offset":"0"}],"quantity_kind":"absolute","from_unit":[{"unit":"km","power":1},{"unit":"h","power":-1}],"to_unit":[{"unit":"m","power":1},{"unit":"s","power":-1}],"claimed_factor":"5/18","claimed_offset":"0"}'

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

CLI

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

Get the client at /clients/cli/.