{
  "capability_id": "engineering.uncertainty.propagate",
  "tool_id": "uncertainty-propagate",
  "engine": "uncertainty-propagate",
  "calculation_version": "1.9.8",
  "generated_at": "2026-09-16T22:03:43.714Z",
  "engine_build": "2026-09-12",
  "test_count": 88,
  "passed": 88,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 11,
      "passed": 11
    },
    "boundary": {
      "total": 48,
      "passed": 48
    },
    "property": {
      "total": 29,
      "passed": 29
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": true,
  "review_kind": "internal",
  "source_checked": true,
  "reviewed_by": "CalculatorX engineering review",
  "reviewer_role": "metrology-engineer",
  "last_reviewed": "2026-08-10",
  "expert_review": {
    "status": "not_applicable",
    "reviewer": null,
    "note": "Internal domain review completed; not a named external expert review.",
    "kind": "internal"
  },
  "internal_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": "internal"
  },
  "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": [
    "Default uncorrelated (rho=0); optional correlations when provided.",
    "Linear propagation assumes a local first-order approximation is adequate. For significant model nonlinearity, consider higher-order treatment (JCGM 100:2008/Amd.1:2026) or Monte Carlo propagation (JCGM 101:2008)."
  ],
  "limitations": [
    "Linear GUM (binary/sensitivity/RSS/budget) or Monte Carlo (JCGM 101) with normal/rectangular draws; not adaptive/MCMC",
    "MC: N in 100…100000 (default 10000), deterministic Mulberry32 seed; confidence → empirical percentiles; k → U=k·u_c",
    "budget/sensitivity Type A/B + distributions are metadata (except MC uses distribution for draws); u is standard uncertainty",
    "contributions are diagonal (c·u)² fractions for linear modes; with correlations percents may not sum to 100%",
    "Product/quotient use absolute first-order forms in linear mode; MC quotient rejects >5% near-zero denominator draws (MONTECARLO_UNSTABLE)",
    "n×n correlation matrix not positive semidefinite → CORRELATION_MATRIX_NOT_PSD (singular PSD allowed); duplicate unordered pair → DUPLICATE_CORRELATION; conflicting ρ for the same pair → CONFLICTING_CORRELATION",
    "Optional Quantity Engine v1.1: SI-prefix conversion + electrical derived rewrites (1000 mV + 2 V → 3 V; V/A → Ω; A·Ω → V; V×A → VA); different additive dimensions → UNIT_MISMATCH; not full SI algebra",
    "Unknown mode → INVALID_MODE; k and confidence together → INVALID_INPUT",
    "confidence with nonzero ρ/correlations → CORRELATED_DOF_NOT_SUPPORTED (use fixed k)",
    "MC rectangular + correlation → CORRELATED_NON_NORMAL_MC_NOT_SUPPORTED (normal marginals only)",
    "Public Agent schema uses canonical field names only (components.u/c/x; correlations i/j as index or name). Runtime still accepts legacy aliases (ua/uncertainty/sensitivity/value) for compatibility."
  ],
  "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",
    "sum/difference with unit_a ≠ unit_b → UNIT_MISMATCH",
    "rho ∉ [-1,1] → VALUE_OUT_OF_RANGE; k≤0 → VALUE_MUST_BE_POSITIVE",
    "RSS with correlations → INVALID_INPUT",
    "confidence with nonzero ρ/correlations → CORRELATED_DOF_NOT_SUPPORTED",
    "Monte Carlo rectangular + correlation → CORRELATED_NON_NORMAL_MC_NOT_SUPPORTED",
    "Monte Carlo quotient with >5% near-zero denominator draws → MONTECARLO_UNSTABLE",
    "n×n correlation matrix not positive semidefinite → CORRELATION_MATRIX_NOT_PSD (pairwise |ρ|≤1 is not sufficient for 3+ variables; singular PSD is allowed)",
    "Duplicate unordered (i,j) pair → DUPLICATE_CORRELATION; conflicting ρ for the same pair → CONFLICTING_CORRELATION"
  ],
  "sources": [
    {
      "title": "JCGM 100:2008 — Evaluation of measurement data (GUM)",
      "section": "Law of propagation of uncertainty",
      "url": "https://www.bipm.org/en/committees/jc/jcgm/publications",
      "supports": "u_c² = Σ (∂f/∂xᵢ)² u²(xᵢ) for uncorrelated inputs",
      "kind": "standard"
    },
    {
      "title": "JCGM 100:2008/Amd.1:2026 — Nonlinearity in measurement models",
      "section": "Amendment 1",
      "url": "https://www.bipm.org/en/committees/jc/jcgm/publications",
      "supports": "First-order linear propagation may be inadequate when the measurement model is significantly nonlinear",
      "kind": "standard"
    },
    {
      "title": "JCGM GUM-6:2020 — Developing and using measurement models",
      "section": "Measurement modelling",
      "url": "https://www.bipm.org/en/committees/jc/jcgm/publications",
      "supports": "Guidance on constructing measurement models for uncertainty evaluation",
      "kind": "standard"
    },
    {
      "title": "JCGM 101:2008 — Propagation of distributions using a Monte Carlo method",
      "section": "GUM Supplement 1",
      "url": "https://www.bipm.org/en/committees/jc/jcgm/publications",
      "supports": "Methodological reference for the implemented Monte Carlo subset (normal/rectangular, seeded sampling, percentile intervals); not adaptive MCM, arbitrary PDFs, or full JCGM 101 validation procedure",
      "kind": "standard"
    },
    {
      "title": "NIST Technical Note 1297",
      "section": "Guidelines for evaluating and expressing uncertainty",
      "url": "https://www.nist.gov/pml/nist-technical-note-1297",
      "supports": "Combined standard uncertainty practice; reporting of u_c",
      "kind": "reference"
    },
    {
      "title": "NIST Guide to the SI (SP 811)",
      "section": "Expression of uncertainty with SI quantities",
      "url": "https://www.nist.gov/pml/special-publication-811",
      "supports": "Unit-consistent reporting of results and uncertainties",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:d8cfcf55210b3e57585f02738f49bb344b4c1cc9d6597384fadb8f7da98e3fb8",
  "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "product",
        "y": 50,
        "u_c": 0.7071067811865476,
        "u_rel": 0.01414213562373095,
        "a": 10,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 5,
            "u": 0.1,
            "variance": 0.25,
            "percent": 49.999999999999986,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 10,
            "u": 0.05,
            "variance": 0.25,
            "percent": 49.999999999999986,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 49.999999999999986
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.71,
          "y": 50,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.71",
          "formatted_y": "50.00"
        }
      },
      "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.632455532033676,
        "u_rel": 0.0632455532033676,
        "y": 10,
        "unit": null,
        "terms": 2,
        "correlations": [],
        "contributions": [
          {
            "i": 0,
            "label": null,
            "c": 2,
            "u": 0.1,
            "variance": 0.04000000000000001,
            "percent": 9.999999999999998,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": null,
            "c": 3,
            "u": 0.2,
            "variance": 0.3600000000000001,
            "percent": 89.99999999999999,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": null,
          "percent": 89.99999999999999
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.63,
          "y": 10,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.63",
          "formatted_y": "10.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "rss",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "rss",
        "uncertainties": [
          0.3,
          0.4
        ]
      },
      "expect": {
        "u_c": 0.5
      },
      "expectWarning": null,
      "actual": {
        "mode": "rss",
        "u_c": 0.5,
        "y": null,
        "unit": null,
        "terms": 2,
        "contributions": [
          {
            "i": 0,
            "label": null,
            "c": 1,
            "u": 0.3,
            "variance": 0.09,
            "percent": 36,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": null,
            "c": 1,
            "u": 0.4,
            "variance": 0.16000000000000003,
            "percent": 64.00000000000001,
            "type": null,
            "nu": null
          }
        ],
        "largest": {
          "i": 1,
          "label": null,
          "percent": 64.00000000000001
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.5,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.50"
        }
      },
      "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "product",
        "y": 0,
        "u_c": 0.5,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 5,
            "u": 0.1,
            "variance": 0.25,
            "percent": 100,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 0,
            "u": 0.05,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 100
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.5,
          "y": 0,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.50",
          "formatted_y": "0.00"
        }
      },
      "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": "bayesian",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "unsupported uncertainty mode"
    },
    {
      "id": "rho-sum",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "rho": 1
      },
      "expect": {
        "y": 150,
        "u_c": 0.3,
        "rho": 1
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.30000000000000004,
        "u_rel": 0.0020000000000000005,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 1,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 44.44444444444444,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": "a",
            "j_label": "b",
            "rho": 1,
            "covariance": 0.04000000000000001,
            "percent": 44.44444444444444
          }
        ],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 44.44444444444444,
          "kind": "diagonal"
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.3,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.30",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "k-expanded",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "k": 2
      },
      "expect": {
        "U": 0.4472135954999579,
        "k": 2
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": 2,
        "U": 0.447213595499958,
        "k_source": "user",
        "confidence": null,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00",
          "k": 2,
          "U": 0.45,
          "formatted_U": "0.45"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "nueff-binary",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "nua": 9,
        "nub": "inf"
      },
      "expect": {
        "nu_eff": 225
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": 9,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": 9
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": 225.00000000000003,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-9
    },
    {
      "id": "student-t-k",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 0,
        "ub": 0,
        "nua": 9,
        "nub": "inf",
        "confidence": 0.95
      },
      "expect": {
        "nu_eff": 9,
        "k": 2.26215716274
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 1,
        "u_c": 0.1,
        "u_rel": 0.1,
        "a": 1,
        "b": 0,
        "ua": 0.1,
        "ub": 0,
        "rho": 0,
        "nua": 9,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 100,
            "type": null,
            "nu": 9
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 100
        },
        "nu_eff": 9,
        "nu_eff_infinite": false,
        "k": 2.2621571627981485,
        "U": 0.22621571627981485,
        "k_source": "student_t",
        "confidence": 0.95,
        "reported": {
          "u_c": 0.1,
          "y": 1,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.10",
          "formatted_y": "1.00",
          "k": 2.2621571627981485,
          "U": 0.23,
          "formatted_U": "0.23"
        }
      },
      "tol": 1e-8
    },
    {
      "id": "budget-basic",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "budget",
        "components": [
          {
            "name": "Vref",
            "x": 5,
            "u": 0.002,
            "c": 1,
            "type": "B"
          },
          {
            "name": "drift",
            "x": 0,
            "u": 0.001,
            "c": 1,
            "type": "B"
          }
        ]
      },
      "expect": {
        "y": 5,
        "u_c": 0.00223606797749979
      },
      "expectWarning": null,
      "actual": {
        "mode": "budget",
        "u_c": 0.0022360679774997894,
        "u_rel": 0.0004472135954999579,
        "y": 5,
        "unit": null,
        "terms": 2,
        "correlations": [],
        "contributions": [
          {
            "i": 0,
            "label": "Vref",
            "c": 1,
            "u": 0.002,
            "variance": 0.000004,
            "percent": 80.00000000000001,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 5
          },
          {
            "i": 1,
            "label": "drift",
            "c": 1,
            "u": 0.001,
            "variance": 0.000001,
            "percent": 20.000000000000004,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 0
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "Vref",
          "percent": 80.00000000000001
        },
        "components": [
          {
            "name": "Vref",
            "u": 0.002,
            "c": 1,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 5
          },
          {
            "name": "drift",
            "u": 0.001,
            "c": 1,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 0
          }
        ],
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.0022,
          "y": 5,
          "significant_digits": 2,
          "decimal_places": 4,
          "formatted_u_c": "0.0022",
          "formatted_y": "5.0000"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "mc-sum",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "montecarlo",
        "model": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "N": 5000,
        "seed": 42
      },
      "expect": {
        "linear_u_c": 0.22360679774997896
      },
      "expectWarning": null,
      "actual": {
        "mode": "montecarlo",
        "model": "sum",
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "terms": 2,
        "y": 149.9994133408001,
        "u_c": 0.22130104926635866,
        "u_rel": 0.0014753460986114697,
        "y_mean": 149.9994133408001,
        "y_median": 149.99920297705714,
        "y_p025": 149.5594093511172,
        "y_p975": 150.43375078932428,
        "y_low": null,
        "y_high": null,
        "linear_u_c": 0.223606797749979,
        "N": 5000,
        "seed": 42,
        "n_valid": 5000,
        "invalid_samples": 0,
        "near_singularity_samples": 0,
        "invalid_fraction": 0,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "nu_eff": null,
        "nu_eff_infinite": false,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "product",
        "y": 0,
        "u_c": 0.25,
        "u_rel": null,
        "a": 5,
        "b": 0,
        "ua": 0.1,
        "ub": 0.05,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 0,
            "u": 0.1,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 5,
            "u": 0.05,
            "variance": 0.0625,
            "percent": 100,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 100
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.25,
          "y": 0,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.25",
          "formatted_y": "0.00"
        }
      },
      "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "y": 0,
        "u_c": 0.020000000000000004,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 0.2,
            "u": 0.1,
            "variance": 0.0004000000000000002,
            "percent": 100.00000000000001,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 0,
            "u": 0.05,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 100.00000000000001
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.02,
          "y": 0,
          "significant_digits": 2,
          "decimal_places": 3,
          "formatted_u_c": "0.020",
          "formatted_y": "0.000"
        }
      },
      "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
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 2,
        "u_c": 0,
        "u_rel": 0,
        "a": 1,
        "b": 1,
        "ua": 0,
        "ub": 0,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 0
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0,
          "y": 2,
          "significant_digits": 2,
          "decimal_places": 0,
          "formatted_u_c": "0",
          "formatted_y": "2"
        }
      },
      "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-unit-mismatch",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "unit_a": "V",
        "unit_b": "A"
      },
      "expectError": "UNIT_MISMATCH",
      "code": "UNIT_MISMATCH",
      "error": "unit_a and unit_b must be compatible for sum/difference"
    },
    {
      "id": "boundary-unit-sum",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "unit_a": "V",
        "unit_b": "V"
      },
      "expect": {
        "y": 150,
        "u_c": 0.22360679774997896,
        "unit": "V"
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "V",
        "unit_a": "V",
        "unit_b": "V",
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-unit-si-sum",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1000,
        "ua": 1,
        "b": 2,
        "ub": 0.01,
        "unit_a": "mV",
        "unit_b": "V"
      },
      "expect": {
        "y": 3,
        "u_c": 0.010049875621120889,
        "unit": "V"
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 3,
        "u_c": 0.01004987562112089,
        "u_rel": 0.00334995854037363,
        "a": 1000,
        "b": 2,
        "ua": 1,
        "ub": 0.01,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "V",
        "unit_a": "mV",
        "unit_b": "V",
        "quantity": {
          "converted": true,
          "scale_a": 0.001,
          "scale_b": 1,
          "a_aligned": 1,
          "b_aligned": 2,
          "ua_aligned": 0.001,
          "ub_aligned": 0.01
        },
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.001,
            "variance": 0.000001,
            "percent": 0.99009900990099,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.01,
            "variance": 0.0001,
            "percent": 99.00990099009901,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 99.00990099009901
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.01,
          "y": 3,
          "significant_digits": 2,
          "decimal_places": 3,
          "formatted_u_c": "0.010",
          "formatted_y": "3.000"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-unit-product",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "product",
        "a": 230,
        "ua": 1,
        "b": 12,
        "ub": 0.1,
        "unit_a": "V",
        "unit_b": "A"
      },
      "expect": {
        "y": 2760,
        "unit": "VA"
      },
      "expectWarning": null,
      "actual": {
        "mode": "product",
        "y": 2760,
        "u_c": 25.942243542145693,
        "u_rel": 0.0093993636022267,
        "a": 230,
        "b": 12,
        "ua": 1,
        "ub": 0.1,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "VA",
        "unit_a": "V",
        "unit_b": "A",
        "quantity": {
          "converted": true,
          "scale_a": 1,
          "scale_b": 1,
          "a_aligned": 230,
          "b_aligned": 12,
          "ua_aligned": 1,
          "ub_aligned": 0.1
        },
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 12,
            "u": 1,
            "variance": 144,
            "percent": 21.396731054977714,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 230,
            "u": 0.1,
            "variance": 529,
            "percent": 78.60326894502231,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 78.60326894502231
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 26,
          "y": 2760,
          "significant_digits": 2,
          "decimal_places": 0,
          "formatted_u_c": "26",
          "formatted_y": "2760"
        }
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-unit-si-quotient",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "quotient",
        "a": 1000,
        "ua": 1,
        "b": 2,
        "ub": 0.01,
        "unit_a": "mV",
        "unit_b": "V"
      },
      "expect": {
        "y": 0.5,
        "unit": "1"
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "y": 0.5,
        "u_c": 0.0025495097567963926,
        "u_rel": 0.005099019513592785,
        "a": 1000,
        "b": 2,
        "ua": 1,
        "ub": 0.01,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "1",
        "unit_a": "mV",
        "unit_b": "V",
        "quantity": {
          "converted": true,
          "scale_a": 0.001,
          "scale_b": 1,
          "a_aligned": 1,
          "b_aligned": 2,
          "ua_aligned": 0.001,
          "ub_aligned": 0.01
        },
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 0.5,
            "u": 0.001,
            "variance": 2.5e-7,
            "percent": 3.846153846153845,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": -0.25,
            "u": 0.01,
            "variance": 0.00000625,
            "percent": 96.15384615384613,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 96.15384615384613
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.0025,
          "y": 0.5,
          "significant_digits": 2,
          "decimal_places": 4,
          "formatted_u_c": "0.0025",
          "formatted_y": "0.5000"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-unit-ohm",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "quotient",
        "a": 10,
        "ua": 0.1,
        "b": 2,
        "ub": 0.01,
        "unit_a": "V",
        "unit_b": "A"
      },
      "expect": {
        "y": 5,
        "unit": "Ω"
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "y": 5,
        "u_c": 0.05590169943749475,
        "u_rel": 0.01118033988749895,
        "a": 10,
        "b": 2,
        "ua": 0.1,
        "ub": 0.01,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "Ω",
        "unit_a": "V",
        "unit_b": "A",
        "quantity": {
          "converted": true,
          "scale_a": 1,
          "scale_b": 1,
          "a_aligned": 10,
          "b_aligned": 2,
          "ua_aligned": 0.1,
          "ub_aligned": 0.01
        },
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 0.5,
            "u": 0.1,
            "variance": 0.0025000000000000005,
            "percent": 80,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": -2.5,
            "u": 0.01,
            "variance": 0.0006250000000000001,
            "percent": 20,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.056,
          "y": 5,
          "significant_digits": 2,
          "decimal_places": 3,
          "formatted_u_c": "0.056",
          "formatted_y": "5.000"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-unit-mv-ma",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "quotient",
        "a": 1000,
        "ua": 1,
        "b": 2,
        "ub": 0.01,
        "unit_a": "mV",
        "unit_b": "mA"
      },
      "expect": {
        "y": 500,
        "unit": "Ω"
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "y": 500,
        "u_c": 2.5495097567963922,
        "u_rel": 0.005099019513592784,
        "a": 1000,
        "b": 2,
        "ua": 1,
        "ub": 0.01,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "Ω",
        "unit_a": "mV",
        "unit_b": "mA",
        "quantity": {
          "converted": true,
          "scale_a": 0.001,
          "scale_b": 0.001,
          "a_aligned": 1,
          "b_aligned": 0.002,
          "ua_aligned": 0.001,
          "ub_aligned": 0.00001
        },
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 500,
            "u": 0.001,
            "variance": 0.25,
            "percent": 3.8461538461538467,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": -250000,
            "u": 0.00001,
            "variance": 6.25,
            "percent": 96.15384615384616,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 96.15384615384616
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 2.5,
          "y": 500,
          "significant_digits": 2,
          "decimal_places": 1,
          "formatted_u_c": "2.5",
          "formatted_y": "500.0"
        }
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-unit-a-ohm",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "product",
        "a": 2,
        "ua": 0.01,
        "b": 5,
        "ub": 0.1,
        "unit_a": "A",
        "unit_b": "Ω"
      },
      "expect": {
        "y": 10,
        "unit": "V"
      },
      "expectWarning": null,
      "actual": {
        "mode": "product",
        "y": 10,
        "u_c": 0.20615528128088306,
        "u_rel": 0.020615528128088305,
        "a": 2,
        "b": 5,
        "ua": 0.01,
        "ub": 0.1,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": "V",
        "unit_a": "A",
        "unit_b": "Ω",
        "quantity": {
          "converted": true,
          "scale_a": 1,
          "scale_b": 1,
          "a_aligned": 2,
          "b_aligned": 5,
          "ua_aligned": 0.01,
          "ub_aligned": 0.1
        },
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 5,
            "u": 0.01,
            "variance": 0.0025000000000000005,
            "percent": 5.882352941176469,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 2,
            "u": 0.1,
            "variance": 0.04000000000000001,
            "percent": 94.11764705882351,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 94.11764705882351
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.21,
          "y": 10,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.21",
          "formatted_y": "10.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-nua-null-infinite",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "nua": null,
        "nub": null
      },
      "expect": {
        "y": 150,
        "nu_eff_infinite": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": true,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-mc-sum",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "model": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "N": 20000,
        "seed": 42
      },
      "expect": {
        "linear_u_c": 0.22360679774997896
      },
      "expectWarning": null,
      "actual": {
        "mode": "montecarlo",
        "model": "sum",
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "terms": 2,
        "y": 149.99777987285188,
        "u_c": 0.22331201411145898,
        "u_rel": 0.0014887687957831986,
        "y_mean": 149.99777987285188,
        "y_median": 149.99934762881657,
        "y_p025": 149.55866345126574,
        "y_p975": 150.43304196438189,
        "y_low": null,
        "y_high": null,
        "linear_u_c": 0.223606797749979,
        "N": 20000,
        "seed": 42,
        "n_valid": 20000,
        "invalid_samples": 0,
        "near_singularity_samples": 0,
        "invalid_fraction": 0,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "nu_eff": null,
        "nu_eff_infinite": false,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-mc-N",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "model": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "N": 50
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "N must be an integer in 100…100000"
    },
    {
      "id": "boundary-mc-budget",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "components": [
          {
            "name": "a",
            "x": 1,
            "u": 0.1
          },
          {
            "name": "b",
            "x": 2,
            "u": 0.2
          }
        ],
        "N": 5000,
        "seed": 1
      },
      "expect": {
        "linear_u_c": 0.22360679774997896
      },
      "expectWarning": null,
      "actual": {
        "mode": "montecarlo",
        "model": "linear",
        "unit": null,
        "terms": 2,
        "labels": [
          "a",
          "b"
        ],
        "correlations": [],
        "y": 2.9979412161635093,
        "u_c": 0.22221998921316938,
        "u_rel": 0.07412419830484407,
        "y_mean": 2.9979412161635093,
        "y_median": 2.999790879812373,
        "y_p025": 2.567207847994571,
        "y_p975": 3.4293838075967185,
        "y_low": null,
        "y_high": null,
        "linear_u_c": 0.223606797749979,
        "N": 5000,
        "seed": 1,
        "n_valid": 5000,
        "invalid_samples": 0,
        "near_singularity_samples": 0,
        "invalid_fraction": 0,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "nu_eff": null,
        "nu_eff_infinite": false,
        "reported": {
          "u_c": 0.22,
          "y": 3,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "3.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-rho-diff",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "difference",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "rho": 1
      },
      "expect": {
        "y": 50,
        "u_c": 0.1,
        "rho": 1
      },
      "expectWarning": null,
      "actual": {
        "mode": "difference",
        "y": 50,
        "u_c": 0.1,
        "u_rel": 0.002,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 1,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 100,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": -1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 400,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": "a",
            "j_label": "b",
            "rho": 1,
            "covariance": -0.04000000000000001,
            "percent": -400
          }
        ],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 400,
          "kind": "diagonal"
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.1,
          "y": 50,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.10",
          "formatted_y": "50.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-rho-out",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "rho": 1.5
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "rho must be in [-1, 1]"
    },
    {
      "id": "boundary-k-invalid",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "k": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "k must be > 0"
    },
    {
      "id": "boundary-sens-corr",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 1
          }
        ]
      },
      "expect": {
        "u_c": 0.3
      },
      "expectWarning": null,
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.30000000000000004,
        "u_rel": null,
        "y": null,
        "unit": null,
        "terms": 2,
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 1
          }
        ],
        "contributions": [
          {
            "i": 0,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": null,
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 44.44444444444444,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": null,
            "j_label": null,
            "rho": 1,
            "covariance": 0.04000000000000001,
            "percent": 44.44444444444444
          }
        ],
        "largest": {
          "i": 1,
          "label": null,
          "percent": 44.44444444444444,
          "kind": "diagonal"
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.3,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.30"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-rss-corr-reject",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "rss",
        "uncertainties": [
          0.1,
          0.2
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.5
          }
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "correlations require sensitivity mode"
    },
    {
      "id": "boundary-contrib-sum",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2
      },
      "expect": {
        "u_c": 0.22360679774997896
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-nueff-sens",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          2,
          1
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "dof": [
          8,
          null
        ],
        "types": [
          "A",
          "B"
        ],
        "labels": [
          "rep",
          "cal"
        ]
      },
      "expect": {
        "nu_eff": 32
      },
      "expectWarning": null,
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.28284271247461906,
        "u_rel": null,
        "y": null,
        "unit": null,
        "terms": 2,
        "correlations": [],
        "contributions": [
          {
            "i": 0,
            "label": "rep",
            "c": 2,
            "u": 0.1,
            "variance": 0.04000000000000001,
            "percent": 49.99999999999999,
            "type": "A",
            "nu": 8
          },
          {
            "i": 1,
            "label": "cal",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 49.99999999999999,
            "type": "B",
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "rep",
          "percent": 49.99999999999999
        },
        "nu_eff": 32.000000000000014,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.28,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.28"
        }
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-dof-length",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "rss",
        "uncertainties": [
          0.1,
          0.2
        ],
        "dof": [
          5
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "dof must match uncertainties length"
    },
    {
      "id": "boundary-nua-alone",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "nua": 10
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "nua and nub must both be set when using binary degrees of freedom"
    },
    {
      "id": "boundary-student-t",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "rss",
        "uncertainties": [
          0.1
        ],
        "dof": [
          9
        ],
        "confidence": 0.95
      },
      "expect": {
        "nu_eff": 9,
        "k": 2.26215716274
      },
      "expectWarning": null,
      "actual": {
        "mode": "rss",
        "u_c": 0.1,
        "y": null,
        "unit": null,
        "terms": 1,
        "contributions": [
          {
            "i": 0,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 100,
            "type": null,
            "nu": 9
          }
        ],
        "largest": {
          "i": 0,
          "label": null,
          "percent": 100
        },
        "nu_eff": 9,
        "nu_eff_infinite": false,
        "k": 2.2621571627981485,
        "U": 0.22621571627981485,
        "k_source": "student_t",
        "confidence": 0.95,
        "reported": {
          "u_c": 0.1,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.10",
          "k": 2.2621571627981485,
          "U": 0.23,
          "formatted_U": "0.23"
        }
      },
      "tol": 1e-8
    },
    {
      "id": "boundary-student-normal",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "confidence": 0.95
      },
      "expect": {
        "k": 1.95996398454
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.223606797749979,
        "u_rel": 0.00149071198499986,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 20,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 80,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 80
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": 1.959963986120195,
        "U": 0.43826127064162107,
        "k_source": "student_t",
        "confidence": 0.95,
        "reported": {
          "u_c": 0.22,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.22",
          "formatted_y": "150.00",
          "k": 1.959963986120195,
          "U": 0.44,
          "formatted_U": "0.44"
        }
      },
      "tol": 1e-7
    },
    {
      "id": "boundary-k-and-confidence",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "k": 2,
        "confidence": 0.95
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "provide either k or confidence, not both"
    },
    {
      "id": "boundary-confidence-range",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "confidence": 1.5
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "confidence must be in (0, 1)"
    },
    {
      "id": "boundary-corr-confidence",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "rho": 0.5,
        "confidence": 0.95
      },
      "expectError": "CORRELATED_DOF_NOT_SUPPORTED",
      "code": "CORRELATED_DOF_NOT_SUPPORTED",
      "error": "Welch–Satterthwaite νeff / Student-t coverage assumes independent uncertainty components"
    },
    {
      "id": "boundary-corr-confidence-sens",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.3
          }
        ],
        "confidence": 0.95
      },
      "expectError": "CORRELATED_DOF_NOT_SUPPORTED",
      "code": "CORRELATED_DOF_NOT_SUPPORTED",
      "error": "Welch–Satterthwaite νeff / Student-t coverage assumes independent uncertainty components"
    },
    {
      "id": "boundary-mc-rect-corr",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "model": "sum",
        "a": 1,
        "ua": 0.1,
        "b": 2,
        "ub": 0.1,
        "rho": 0.5,
        "distribution": "rectangular",
        "N": 1000,
        "seed": 1
      },
      "expectError": "CORRELATED_NON_NORMAL_MC_NOT_SUPPORTED",
      "code": "CORRELATED_NON_NORMAL_MC_NOT_SUPPORTED",
      "error": "correlated Monte Carlo currently supports normal marginals only"
    },
    {
      "id": "boundary-mc-quotient-unstable",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "montecarlo",
        "model": "quotient",
        "a": 1,
        "ua": 0.05,
        "b": 0.01,
        "ub": 0.1,
        "N": 8000,
        "seed": 7,
        "distribution": "normal"
      },
      "expectError": "MONTECARLO_UNSTABLE",
      "code": "MONTECARLO_UNSTABLE",
      "error": "Monte Carlo output unstable: too many samples near a singularity"
    },
    {
      "id": "boundary-cov-contrib",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sum",
        "a": 100,
        "ua": 0.1,
        "b": 50,
        "ub": 0.2,
        "rho": 1
      },
      "expect": {
        "u_c": 0.3
      },
      "expectWarning": null,
      "actual": {
        "mode": "sum",
        "y": 150,
        "u_c": 0.30000000000000004,
        "u_rel": 0.0020000000000000005,
        "a": 100,
        "b": 50,
        "ua": 0.1,
        "ub": 0.2,
        "rho": 1,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 44.44444444444444,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": "a",
            "j_label": "b",
            "rho": 1,
            "covariance": 0.04000000000000001,
            "percent": 44.44444444444444
          }
        ],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 44.44444444444444,
          "kind": "diagonal"
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.3,
          "y": 150,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.30",
          "formatted_y": "150.00"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-budget",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "budget",
        "components": [
          {
            "name": "Vref",
            "x": 5,
            "u": 0.002,
            "c": 1,
            "type": "B"
          },
          {
            "name": "drift",
            "x": 0,
            "u": 0.001,
            "c": 1,
            "type": "B"
          }
        ]
      },
      "expect": {
        "y": 5,
        "u_c": 0.0022360679774997894
      },
      "expectWarning": null,
      "actual": {
        "mode": "budget",
        "u_c": 0.0022360679774997894,
        "u_rel": 0.0004472135954999579,
        "y": 5,
        "unit": null,
        "terms": 2,
        "correlations": [],
        "contributions": [
          {
            "i": 0,
            "label": "Vref",
            "c": 1,
            "u": 0.002,
            "variance": 0.000004,
            "percent": 80.00000000000001,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 5
          },
          {
            "i": 1,
            "label": "drift",
            "c": 1,
            "u": 0.001,
            "variance": 0.000001,
            "percent": 20.000000000000004,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 0
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "Vref",
          "percent": 80.00000000000001
        },
        "components": [
          {
            "name": "Vref",
            "u": 0.002,
            "c": 1,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 5
          },
          {
            "name": "drift",
            "u": 0.001,
            "c": 1,
            "type": "B",
            "nu": null,
            "distribution": null,
            "x": 0
          }
        ],
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.0022,
          "y": 5,
          "significant_digits": 2,
          "decimal_places": 4,
          "formatted_u_c": "0.0022",
          "formatted_y": "5.0000"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-budget-named-corr",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "budget",
        "components": [
          {
            "name": "a",
            "u": 0.1,
            "c": 1
          },
          {
            "name": "b",
            "u": 0.2,
            "c": 1
          }
        ],
        "correlations": [
          {
            "i": "a",
            "j": "b",
            "rho": 1
          }
        ]
      },
      "expect": {
        "u_c": 0.3
      },
      "expectWarning": null,
      "actual": {
        "mode": "budget",
        "u_c": 0.30000000000000004,
        "u_rel": null,
        "y": null,
        "unit": null,
        "terms": 2,
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 1,
            "i_name": "a",
            "j_name": "b"
          }
        ],
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null,
            "distribution": null,
            "x": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 1,
            "u": 0.2,
            "variance": 0.04000000000000001,
            "percent": 44.44444444444444,
            "type": null,
            "nu": null,
            "distribution": null,
            "x": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": "a",
            "j_label": "b",
            "rho": 1,
            "covariance": 0.04000000000000001,
            "percent": 44.44444444444444
          }
        ],
        "largest": {
          "i": 1,
          "label": "b",
          "percent": 44.44444444444444,
          "kind": "diagonal"
        },
        "components": [
          {
            "name": "a",
            "u": 0.1,
            "c": 1,
            "type": null,
            "nu": null,
            "distribution": null,
            "x": null
          },
          {
            "name": "b",
            "u": 0.2,
            "c": 1,
            "type": null,
            "nu": null,
            "distribution": null,
            "x": null
          }
        ],
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.3,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.30"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-budget-empty",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "budget",
        "components": []
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "components array is required"
    },
    {
      "id": "boundary-budget-partial-x",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "budget",
        "components": [
          {
            "name": "a",
            "x": 1,
            "u": 0.1
          },
          {
            "name": "b",
            "u": 0.1
          }
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "provide x/value for all components or none"
    },
    {
      "id": "boundary-corr-psd-3x3",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.1,
          0.1
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.3
          },
          {
            "i": 0,
            "j": 2,
            "rho": 0.2
          },
          {
            "i": 1,
            "j": 2,
            "rho": 0.1
          }
        ]
      },
      "expect": {
        "u_c": 0.20493901531919195
      },
      "expectWarning": null,
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.20493901531919198,
        "u_rel": null,
        "y": null,
        "unit": null,
        "terms": 3,
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.3
          },
          {
            "i": 0,
            "j": 2,
            "rho": 0.2
          },
          {
            "i": 1,
            "j": 2,
            "rho": 0.1
          }
        ],
        "contributions": [
          {
            "i": 0,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 23.809523809523814,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 23.809523809523814,
            "type": null,
            "nu": null
          },
          {
            "i": 2,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 23.809523809523814,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": null,
            "j_label": null,
            "rho": 0.3,
            "covariance": 0.006,
            "percent": 14.285714285714285
          },
          {
            "i": 0,
            "j": 2,
            "i_label": null,
            "j_label": null,
            "rho": 0.2,
            "covariance": 0.004000000000000001,
            "percent": 9.523809523809526
          },
          {
            "i": 1,
            "j": 2,
            "i_label": null,
            "j_label": null,
            "rho": 0.1,
            "covariance": 0.0020000000000000005,
            "percent": 4.761904761904763
          }
        ],
        "largest": {
          "i": 0,
          "label": null,
          "percent": 23.809523809523814,
          "kind": "diagonal"
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.2,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.20"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-corr-singular-psd",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.1,
          0.1
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 1
          },
          {
            "i": 0,
            "j": 2,
            "rho": 1
          },
          {
            "i": 1,
            "j": 2,
            "rho": 1
          }
        ]
      },
      "expect": {
        "u_c": 0.3
      },
      "expectWarning": null,
      "actual": {
        "mode": "sensitivity",
        "u_c": 0.30000000000000004,
        "u_rel": null,
        "y": null,
        "unit": null,
        "terms": 3,
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 1
          },
          {
            "i": 0,
            "j": 2,
            "rho": 1
          },
          {
            "i": 1,
            "j": 2,
            "rho": 1
          }
        ],
        "contributions": [
          {
            "i": 0,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null
          },
          {
            "i": 2,
            "label": null,
            "c": 1,
            "u": 0.1,
            "variance": 0.010000000000000002,
            "percent": 11.11111111111111,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [
          {
            "i": 0,
            "j": 1,
            "i_label": null,
            "j_label": null,
            "rho": 1,
            "covariance": 0.020000000000000004,
            "percent": 22.22222222222222
          },
          {
            "i": 0,
            "j": 2,
            "i_label": null,
            "j_label": null,
            "rho": 1,
            "covariance": 0.020000000000000004,
            "percent": 22.22222222222222
          },
          {
            "i": 1,
            "j": 2,
            "i_label": null,
            "j_label": null,
            "rho": 1,
            "covariance": 0.020000000000000004,
            "percent": 22.22222222222222
          }
        ],
        "largest": {
          "i": 0,
          "label": null,
          "percent": 11.11111111111111,
          "kind": "diagonal"
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.3,
          "y": null,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.30"
        }
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-corr-not-psd",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.1,
          0.1
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.9
          },
          {
            "i": 0,
            "j": 2,
            "rho": 0.9
          },
          {
            "i": 1,
            "j": 2,
            "rho": -0.9
          }
        ]
      },
      "expectError": "CORRELATION_MATRIX_NOT_PSD",
      "code": "CORRELATION_MATRIX_NOT_PSD",
      "error": "correlation matrix is not positive semidefinite"
    },
    {
      "id": "boundary-corr-duplicate",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.5
          },
          {
            "i": 1,
            "j": 0,
            "rho": 0.5
          }
        ]
      },
      "expectError": "DUPLICATE_CORRELATION",
      "code": "DUPLICATE_CORRELATION",
      "error": "duplicate correlation for indices 0,1"
    },
    {
      "id": "boundary-corr-conflict",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "sensitivity",
        "coefficients": [
          1,
          1
        ],
        "uncertainties": [
          0.1,
          0.2
        ],
        "correlations": [
          {
            "i": 0,
            "j": 1,
            "rho": 0.2
          },
          {
            "i": 1,
            "j": 0,
            "rho": 0.8
          }
        ]
      },
      "expectError": "CONFLICTING_CORRELATION",
      "code": "CONFLICTING_CORRELATION",
      "error": "conflicting ρ for indices 0,1"
    },
    {
      "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,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 5,
            "u": 0.1,
            "variance": 0.25,
            "percent": 49.999999999999986,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 10,
            "u": 0.05,
            "variance": 0.25,
            "percent": 49.999999999999986,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 49.999999999999986
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.71,
          "y": 50,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.71",
          "formatted_y": "50.00"
        }
      }
    },
    {
      "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,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 5,
            "u": 0.1,
            "variance": 0.25,
            "percent": 100,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 0,
            "u": 0.05,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 100
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.5,
          "y": 0,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.50",
          "formatted_y": "0.00"
        }
      }
    },
    {
      "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.020000000000000004,
        "u_rel": null,
        "a": 0,
        "b": 5,
        "ua": 0.1,
        "ub": 0.05,
        "rho": 0,
        "nua": null,
        "nub": null,
        "unit": null,
        "unit_a": null,
        "unit_b": null,
        "contributions": [
          {
            "i": 0,
            "label": "a",
            "c": 0.2,
            "u": 0.1,
            "variance": 0.0004000000000000002,
            "percent": 100.00000000000001,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "b",
            "c": 0,
            "u": 0.05,
            "variance": 0,
            "percent": 0,
            "type": null,
            "nu": null
          }
        ],
        "covariance_contributions": [],
        "largest": {
          "i": 0,
          "label": "a",
          "percent": 100.00000000000001
        },
        "nu_eff": null,
        "nu_eff_infinite": false,
        "k": null,
        "U": null,
        "k_source": null,
        "confidence": null,
        "reported": {
          "u_c": 0.02,
          "y": 0,
          "significant_digits": 2,
          "decimal_places": 3,
          "formatted_u_c": "0.020",
          "formatted_y": "0.000"
        }
      }
    },
    {
      "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
    },
    {
      "id": "property-reported",
      "ok": true,
      "kind": "property",
      "detail": "reported u_c=0.22 (2 sig) with formatted_y=150.00; raw retained",
      "expect": {
        "reported_u_c": 0.22,
        "formatted_y": "150.00",
        "raw": 0.22360679774997896
      },
      "actual": {
        "u_c": 0.22,
        "y": 150,
        "significant_digits": 2,
        "decimal_places": 2,
        "formatted_u_c": "0.22",
        "formatted_y": "150.00"
      }
    },
    {
      "id": "property-unit-match",
      "ok": true,
      "kind": "property",
      "detail": "matching units → V",
      "expect": "V",
      "actual": "V"
    },
    {
      "id": "property-unit-mismatch",
      "ok": true,
      "kind": "property",
      "detail": "V+A → UNIT_MISMATCH",
      "expect": "UNIT_MISMATCH",
      "actual": true
    },
    {
      "id": "property-unit-si-prefix",
      "ok": true,
      "kind": "property",
      "detail": "1000 mV + 2 V → 3 V",
      "expect": {
        "y": 3,
        "unit": "V"
      },
      "actual": {
        "y": 3,
        "unit": "V",
        "converted": true
      }
    },
    {
      "id": "property-unit-product",
      "ok": true,
      "kind": "property",
      "detail": "product units → VA",
      "expect": "VA",
      "actual": "VA"
    },
    {
      "id": "property-unit-ohm",
      "ok": true,
      "kind": "property",
      "detail": "V/A → Ω",
      "expect": {
        "y": 5,
        "unit": "Ω"
      },
      "actual": {
        "y": 5,
        "unit": "Ω"
      }
    },
    {
      "id": "property-unit-mv-ma",
      "ok": true,
      "kind": "property",
      "detail": "mV/mA → Ω after SI convert",
      "expect": {
        "y": 500,
        "unit": "Ω"
      },
      "actual": {
        "y": 500,
        "unit": "Ω"
      }
    },
    {
      "id": "property-rho-perfect",
      "ok": true,
      "kind": "property",
      "detail": "sum ρ=1 → ua+ub",
      "expect": 0.3,
      "actual": 0.30000000000000004
    },
    {
      "id": "property-rho-anti",
      "ok": true,
      "kind": "property",
      "detail": "sum ρ=−1 → |ua−ub|",
      "expect": 0.1,
      "actual": 0.1
    },
    {
      "id": "property-expanded-U",
      "ok": true,
      "kind": "property",
      "detail": "U=k·u_c with reported.U",
      "expect": {
        "U": 0.4472135954999579,
        "reported_U": 0.45
      },
      "actual": {
        "U": 0.447213595499958,
        "reported_U": 0.45
      }
    },
    {
      "id": "property-sens-rho0",
      "ok": true,
      "kind": "property",
      "detail": "sensitivity ρ=0 matches uncorrelated",
      "expect": 0.6324555320336759,
      "actual": 0.632455532033676
    },
    {
      "id": "property-contrib",
      "ok": true,
      "kind": "property",
      "detail": "ub dominates → 80%",
      "expect": {
        "p0": 20,
        "p1": 80,
        "largest": 1
      },
      "actual": {
        "p0": 20,
        "p1": 80,
        "largest": 1
      }
    },
    {
      "id": "property-nueff",
      "ok": true,
      "kind": "property",
      "detail": "WS νeff with νb→∞",
      "expect": 225,
      "actual": 225.00000000000003
    },
    {
      "id": "property-types",
      "ok": true,
      "kind": "property",
      "detail": "Type A/B + labels pass-through",
      "expect": {
        "type": "A",
        "label": "y"
      },
      "actual": {
        "type": "A",
        "label": "y"
      }
    },
    {
      "id": "property-student-t",
      "ok": true,
      "kind": "property",
      "detail": "Student-t k(ν=9, p=0.95)",
      "expect": {
        "k": 2.26215716274,
        "source": "student_t"
      },
      "actual": {
        "k": 2.2621571627981485,
        "source": "student_t"
      }
    },
    {
      "id": "property-budget",
      "ok": true,
      "kind": "property",
      "detail": "budget y=Σx, Vref largest",
      "expect": {
        "y": 5,
        "largest": "Vref"
      },
      "actual": {
        "y": 5,
        "largest": "Vref"
      }
    },
    {
      "id": "property-mc-sum",
      "ok": true,
      "kind": "property",
      "detail": "MC sum ≈ linear u_c within 3%",
      "expect": {
        "linear": 0.22360679774997896
      },
      "actual": {
        "u_c": 0.22374005459107515,
        "y": 149.99808687493373
      }
    },
    {
      "id": "property-corr-singular-psd",
      "ok": true,
      "kind": "property",
      "detail": "all ρ=1 3×3 → u_c=0.3",
      "expect": 0.3,
      "actual": 0.30000000000000004
    },
    {
      "id": "property-corr-not-psd",
      "ok": true,
      "kind": "property",
      "detail": "pairwise |ρ|≤1 but non-PSD 3×3 → CORRELATION_MATRIX_NOT_PSD",
      "expect": "CORRELATION_MATRIX_NOT_PSD",
      "actual": true
    }
  ],
  "tier": "internally_reviewed",
  "verification": {
    "tests": {
      "passed": 88,
      "total": 88,
      "golden": 11,
      "boundary": 48,
      "property": 29
    },
    "contract_checks": {
      "passed": 8,
      "total": 8
    }
  },
  "evidence_core_generated_at": "2026-09-12T08:32:37.705Z",
  "rendered_at": "2026-09-16T22:03:43.714Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.9.8",
    "artifacts": {
      "engine": "1.9.8",
      "page": "1.9.8",
      "capability": "1.9.8",
      "evidence": "1.9.8",
      "input_schema": "1.9.8",
      "output_schema": "1.9.8",
      "mcp_contract": "1.9.8"
    },
    "digests": {
      "input_schema_sha256": "263d0ba0dda3ea81aa635bcd61d0eb9e9e9fc347ab4890b6cc20ccacc3a6843f",
      "output_schema_sha256": "d1d0c1d06cbe6b38725a8566ba4273291b9558081c5786b8e0b65b862a8e66b1",
      "evidence_sha256": "da6612d4866cb4c184cf7a31e8675ea177e53b838afac8a26eac8eeb546eacf5",
      "evidence_core_sha256": "da6612d4866cb4c184cf7a31e8675ea177e53b838afac8a26eac8eeb546eacf5",
      "capability_sha256": "32eef73c205b1d88c979bd3891878e7b944d8ea4f0aca766355d52e8e4d2e9a9",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 8,
      "passed": 8,
      "failed": 0,
      "items": [
        {
          "id": "contract-page-version",
          "status": "pass",
          "detail": "1.9.8"
        },
        {
          "id": "contract-capability-version",
          "status": "pass",
          "detail": "1.9.8"
        },
        {
          "id": "contract-input-schema-version",
          "status": "pass",
          "detail": "1.9.8"
        },
        {
          "id": "contract-output-schema-version",
          "status": "pass",
          "detail": "1.9.8"
        },
        {
          "id": "evidence-version-matches-manifest",
          "status": "pass",
          "detail": "1.9.8"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
