Home Developers Units & Quantities

CalculatorX Developers

Unit definition data

Preview definition data, with fixed snapshot URLs. This is not a new Quantity conversion API or a CVP verification package.

Units & Quantities (UUCE)

Planned: a shared unit engine for standalone conversions and calculator inputs. UUCE conversion execution through REST/MCP is not available yet.

304 definitions · 68 quantity kinds. Browse Unit Directory →

Fixed snapshots

Current snapshot: 0.3.0-preview.3. Versioned files are retained; a changed file requires a new registry version. Fetch these URLs directly rather than extracting data from hashed browser bundles.

Identity and scope

Use unit_id as identity within a pinned snapshot. Slugs identify pages; codes and symbols are case-sensitive. Aliases help discovery and do not authorize ambiguous execution. Unicode spellings are explicit aliases: this contract does not apply global case folding, NFKC normalization, implicit prefixes or an expression parser.

Schema 1.2.0 keeps IDs, slugs and registry codes unique. The projection's lookup separates unit_id, code, symbol and alias namespaces. Each token maps to an array of candidate IDs. Shared ft and minute tokens must not silently select a definition. Use an explicit namespace and quantity kind, then require one candidate. These are definition-data lookups, not a public execution endpoint.

A canonical unit may declare applicable_quantity_kinds, including its primary quantity_kind. The projection exposes these as quantity_kinds. For example, cubic metre serves volume and section modulus without duplicating its definition. Every declared kind must have the same dimension and roles, and the reference unit must support all of them. The model field still chooses the quantity kind; this is not permission to exchange values between different quantities.

Dimension vectors use the order length, mass, time, electric current, thermodynamic temperature, amount of substance, luminous intensity. Equal vectors do not by themselves establish quantity-kind compatibility. Domains are discovery tags; owner packages identify maintainers.

Point values use scale and offset. Intervals use scale only. The directory describes these roles; linked legacy tools continue to use their own contracts. The data snapshot does not make them UUCE operations.

Definition digest contract v2

Schema 1.1 coefficients may include pi_power on scales: numerator / denominator × π^pi_power. Omitted power means zero; nonzero powers are integers from −12 to 12. This restricted exact form represents degree, arcminute, arcsecond, turn and gon without rounding π. Offsets remain rational. This is definition arithmetic, not a general symbolic algebra engine or an execution precision policy. Plane angle, solid angle and ratio remain different quantity kinds even though their SI dimension is 1.

Schema 1.2 adds explicit expression_roles for temperature factors. A kelvin or Celsius factor inside heat capacity or conductivity must declare interval; only its scale participates. Temperature points remain forbidden in products. Orphan roles and roles unsupported by the referenced unit are rejected. Displayed ΔK or Δ°C indicates this role.

The algorithm is SHA-256 of UTF-8 JSON with no whitespace or final newline. Recursively sort object keys using JavaScript string order; retain array order. Strings are not Unicode-normalized. Coefficients are decimal integer strings, not floating-point numbers. This is the CalculatorX v1 serialization rule, not a claim of RFC 8785 conformance.

  1. Registry content digest: hash the entire authored definitions document.
  2. Definition content digest: hash the authored unit record after reducing its transform scale and offset to coprime fractions with positive denominators, retaining a nonzero pi_power on nonzero coefficients and omitting a zero power. This preserves the schema 1.0 rule for rational definitions.
  3. Definition dependency digest: start with that record, recursively include reference units and expression factors, de-duplicate and sort unit IDs. Hash an object containing definitions (authored records in ID order), kinds (all applicable kind records sorted by ID) and sources (referenced source records sorted by ID).

Definition content includes aliases, scope and source locators as well as mathematical coefficients. Source metadata affects dependency and registry digests. Editing a kind's domain tags affects dependency digests without changing unit content digests. Generated display prose is outside these digests. Digests establish content identity; they do not authenticate the publisher or prove numerical correctness.

node verify-digests-v3.js definitions.json registry.json

The v3 example checks schema 1.0, 1.1 and 1.2 snapshots. Schema 1.2 projections declare calculatorx-unit-definition-digests-v2, binding all applicable kinds in the dependency closure. Earlier snapshots use digest contract v1 with only the primary kind. The original v1 and v2 examples remain available for the retained 0.1.0 and 0.2.0 previews. Definition counts exclude aliases and conversion pairs. Systems and current/historical usage are browsing metadata; neither establishes operation compatibility or CVP status.

Compare the reported registry digest with a value obtained from a trusted channel. Editing both downloaded documents and recomputing all digests cannot be detected by an internal consistency check alone.

Calculator field bindings

Participating Math capabilities expose a unit_contract through inspect_capability and REST result_detail; MCP execution includes it in both result and result_detail. This is a set of field declarations, including inactive operation branches. Paths are relative to inputs or the result value: dots separate properties, * denotes array items, and $ denotes a scalar result.

Fixed fields reference pinned UUCE IDs, revisions and content/dependency digests. Angular selectors preserve the existing deg/rad choice and default. Percent values use cx:percent; fractional ratios use cx:one. A result obtained by solving for an amount does not inherit a percentage unit. Abstract geometry keeps consistent input units and their squared/cubed derivatives; it does not silently choose metres. These declarations do not run conversions, change angle wrapping or extend numerical certification.

Versions and review state

The contract and records remain Preview. Pin a registry version and check its digest. Definition-content edits require a new unit revision and registry version; source or kind metadata changes require a new registry version. Do not reuse an identity for a different unit. Retired definitions retain their old snapshots; automated replacement and cross-version compatibility are not promised.

Candidate is a definition lifecycle state, independent of conversion availability and Capability@Version verification. Public worked examples and Evidence summaries are separate from private CVP cases, oracles and checkers. This download does not expose or replay the private validation suite.

Browse the Unit Directory · CVP scope