{
  "capability_id": "engineering.uncertainty.propagate",
  "tool_id": "uncertainty-propagate",
  "engine": "uncertainty-propagate",
  "calculation_version": "1.1.0",
  "generated_at": "2026-08-10T12:32:52.651Z",
  "engine_build": "2026-08-10",
  "test_count": 31,
  "passed": 31,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 5,
      "passed": 5
    },
    "boundary": {
      "total": 16,
      "passed": 16
    },
    "property": {
      "total": 10,
      "passed": 10
    }
  },
  "engine_tested": true,
  "expert_reviewed": true,
  "internally_reviewed": false,
  "review_kind": "expert",
  "source_checked": true,
  "reviewed_by": "CalculatorX engineering review",
  "reviewer_role": "metrology-engineer",
  "last_reviewed": "2026-08-10",
  "expert_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX engineering review",
      "role": "metrology-engineer"
    },
    "reviewed_at": "2026-08-10",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "expert"
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/engineering/uncertainty-propagate",
  "api": "https://www.calculatorx.com/api/v1/calc/uncertainty-propagate",
  "schema_input": "https://www.calculatorx.com/schemas/engineering.uncertainty.propagate.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/engineering.uncertainty.propagate.output.json",
  "assumptions": [
    "Uncorrelated inputs.",
    "First-order (linear) model is adequate."
  ],
  "limitations": [
    "Linear (first-order) GUM model; uncorrelated inputs assumed",
    "Not Monte Carlo, not coverage factors (k), not Type A/B evaluation",
    "Product/quotient use absolute first-order forms; quotient rejects b=0 (DIVISION_BY_ZERO); u_rel omitted when y=0",
    "Unknown mode → INVALID_MODE; negative ua/ub → VALUE_MUST_BE_NON_NEGATIVE"
  ],
  "boundary_conditions": [
    "Missing required fields → MISSING_REQUIRED_INPUT",
    "Negative ua/ub → VALUE_MUST_BE_NON_NEGATIVE",
    "Unknown mode → INVALID_MODE",
    "Quotient with b=0 → DIVISION_BY_ZERO",
    "Product with a=0 or b=0 is allowed (absolute form); u_rel omitted when y=0"
  ],
  "sources": [
    "JCGM 100:2008 — Evaluation of measurement data (GUM) — Law of propagation of uncertainty — u_c² = Σ (∂f/∂xᵢ)² u²(xᵢ) for uncorrelated inputs (https://www.bipm.org/en/committees/jc/jcgm/publications)",
    "NIST Technical Note 1297 — Guidelines for evaluating and expressing uncertainty — Combined standard uncertainty practice (https://www.nist.gov/pml/nist-technical-note-1297)",
    "NIST Guide to the SI (SP 811) — Expression of uncertainty with SI quantities — Unit-consistent reporting of results and uncertainties (https://www.nist.gov/pml/special-publication-811)"
  ],
  "fingerprint": "sha256:f20854508e03e5b0844fd3aaa5295ece694d1f8df0832df516af2c0d52a6314d",
  "tests": [
    {
      "id": "sum-default",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2
      },
      "expect": {
        "y": 150,
        "u_c": 0.22360679774997896
      },
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2
      },
      "tol": 1e-12
    },
    {
      "id": "product-default",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "product",
        "a": 10,
        "ua": 0.1,
        "b": 5,
        "ub": 0.05
      },
      "expect": {
        "y": 50,
        "u_c": 0.7071067811865476
      },
      "actual": {
        "mode": "product",
        "y": 50,
        "u_c": 0.7071067811865476,
        "u_rel": 0.01414213562373095,
        "a": 10,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      },
      "tol": 1e-12
    },
    {
      "id": "sensitivity",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          2,
          3
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "y": 10
      },
      "expect": {
        "u_c": 0.6324555320336759,
        "u_rel": 0.06324555320336758
      },
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.632455532033676,
        "u_rel": 0.0632455532033676,
        "y": 10,
        "terms": 2
      },
      "tol": 1e-12
    },
    {
      "id": "rss",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "rss",
        "uncertainties": [
          0.3,
          0.4
        ]
      },
      "expect": {
        "u_c": 0.5
      },
      "actual": {
        "mode": "rss",
        "u_c": 0.5,
        "y": null,
        "terms": 2
      },
      "tol": 1e-12
    },
    {
      "id": "product-a-zero",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "product",
        "a": 0,
        "ua": 0.1,
        "b": 5,
        "ub": 0.05
      },
      "expect": {
        "y": 0,
        "u_c": 0.5
      },
      "actual": {
        "mode": "product",
        "y": 0,
        "u_c": 0.5,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      },
      "tol": 1e-12
    },
    {
      "id": "quotient-b-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "quotient",
        "a": 1,
        "ua": 0.1,
        "b": 0,
        "ub": 0.05
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "b must be non-zero for quotient"
    },
    {
      "id": "missing-ua",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "b": 2,
        "ub": 0.1
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "ua is required"
    },
    {
      "id": "invalid-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "unsupported uncertainty mode"
    },
    {
      "id": "boundary-sum",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2
      },
      "expect": {
        "y": 150,
        "u_c": 0.22360679774997896
      },
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-product-a-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "product",
        "a": 0,
        "ua": 0.1,
        "b": 5,
        "ub": 0.05
      },
      "expect": {
        "y": 0,
        "u_c": 0.5
      },
      "actual": {
        "mode": "product",
        "y": 0,
        "u_c": 0.5,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-product-b-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "product",
        "a": 5,
        "ua": 0.1,
        "b": 0,
        "ub": 0.05
      },
      "expect": {
        "y": 0,
        "u_c": 0.25
      },
      "actual": {
        "mode": "product",
        "y": 0,
        "u_c": 0.25,
        "u_rel": null,
        "a": 5,
        "b": 0,
        "ua": 0.1,
        "ub": 0.05
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-quotient-a-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "quotient",
        "a": 0,
        "ua": 0.1,
        "b": 5,
        "ub": 0.05
      },
      "expect": {
        "y": 0,
        "u_c": 0.02
      },
      "actual": {
        "mode": "quotient",
        "y": 0,
        "u_c": 0.02,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-quotient-b-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "quotient",
        "a": 1,
        "ua": 0.1,
        "b": 0,
        "ub": 0.05
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "b must be non-zero for quotient"
    },
    {
      "id": "boundary-sensitivity",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          2,
          3
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "y": 10
      },
      "expect": {
        "u_c": 0.6324555320336759,
        "u_rel": 0.06324555320336758
      },
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.632455532033676,
        "u_rel": 0.0632455532033676,
        "y": 10,
        "terms": 2
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-rss",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "rss",
        "uncertainties": [
          0.3,
          0.4
        ]
      },
      "expect": {
        "u_c": 0.5
      },
      "actual": {
        "mode": "rss",
        "u_c": 0.5,
        "y": null,
        "terms": 2
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-all-zero-u",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0,
        "b": 1,
        "ub": 0
      },
      "expect": {
        "y": 2,
        "u_c": 0
      },
      "actual": {
        "mode": "sum",
        "y": 2,
        "u_c": 0,
        "u_rel": 0,
        "a": 1,
        "b": 1,
        "ua": 0,
        "ub": 0
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-coeffs-length",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          2
        ],
        "uncertainties": [
          0.1
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "coefficients must match uncertainties length"
    },
    {
      "id": "boundary-empty-uncertainties",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "rss",
        "uncertainties": []
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "uncertainties array is required"
    },
    {
      "id": "boundary-neg-ua",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": -0.1,
        "b": 2,
        "ub": 0.1
      },
      "expectError": "VALUE_MUST_BE_NON_NEGATIVE",
      "code": "VALUE_MUST_BE_NON_NEGATIVE",
      "error": "ua must be ≥ 0"
    },
    {
      "id": "boundary-missing-ua",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "b": 2,
        "ub": 0.1
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "ua is required"
    },
    {
      "id": "boundary-invalid-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "unsupported uncertainty mode"
    },
    {
      "id": "property-sum-y",
      "ok": true,
      "kind": "property",
      "detail": "y=a+b",
      "expect": 150,
      "actual": 150
    },
    {
      "id": "property-sum-u",
      "ok": true,
      "kind": "property",
      "detail": "u=√(ua²+ub²)",
      "expect": 0.22360679774997896,
      "actual": 0.223606797749979
    },
    {
      "id": "property-diff-u",
      "ok": true,
      "kind": "property",
      "detail": "diff shares RSS u",
      "expect": 0.223606797749979,
      "actual": 0.223606797749979
    },
    {
      "id": "property-product",
      "ok": true,
      "kind": "property",
      "detail": "product absolute first-order",
      "expect": {
        "y": 50,
        "u_c": 0.7071067811865476
      },
      "actual": {
        "mode": "product",
        "y": 50,
        "u_c": 0.7071067811865476,
        "u_rel": 0.01414213562373095,
        "a": 10,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      }
    },
    {
      "id": "property-product-a-zero",
      "ok": true,
      "kind": "property",
      "detail": "product a=0 → y=0, u_c=|b|ua, u_rel null",
      "expect": {
        "y": 0,
        "u_c": 0.5,
        "u_rel": null
      },
      "actual": {
        "mode": "product",
        "y": 0,
        "u_c": 0.5,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      }
    },
    {
      "id": "property-quotient-a-zero",
      "ok": true,
      "kind": "property",
      "detail": "quotient a=0 → u_c=|ua/b|, u_rel null",
      "expect": {
        "y": 0,
        "u_c": 0.02,
        "u_rel": null
      },
      "actual": {
        "mode": "quotient",
        "y": 0,
        "u_c": 0.02,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05
      }
    },
    {
      "id": "property-quotient-b-zero",
      "ok": true,
      "kind": "property",
      "detail": "quotient b=0 → DIVISION_BY_ZERO",
      "expect": "DIVISION_BY_ZERO",
      "actual": true
    },
    {
      "id": "property-sens",
      "ok": true,
      "kind": "property",
      "detail": "√Σ(c·u)²",
      "expect": 0.6324555320336759,
      "actual": 0.632455532033676
    },
    {
      "id": "property-rss",
      "ok": true,
      "kind": "property",
      "detail": "3-4-5 RSS",
      "expect": 0.5,
      "actual": 0.5
    },
    {
      "id": "property-zero-u",
      "ok": true,
      "kind": "property",
      "detail": "all ua=0 → u_c=0",
      "expect": 0,
      "actual": 0
    }
  ],
  "tier": "expert_verified"
}
