{
  "capability_id": "engineering.tolerance.stackup",
  "calculation_version": "1.4.0",
  "protocol_version": "1.0.0-proposed",
  "protocol_document_status": "proposed",
  "verification_revision": "2026-09-16.o3-linear",
  "oracle": {
    "class": "O3",
    "library": "mpmath 1.4.1",
    "mpmath_dps": 80,
    "backend": null,
    "rounding": null,
    "generator_id": "tolerance-stackup-mpmath-o3",
    "generator_version": "1.0.0",
    "generator_sha256": "8c24d35958d7699cd309e037f8607c6b6eca8186be81d0acf9d74beedd683ff1",
    "table_sha256": "c4a42ddcea761a928f5000550fe934a9fdc7e76b98583d5fa12f5551ad08c917",
    "seed": "20260916.stackup-o3",
    "independent_of_iut": true
  },
  "claim_scope": "≤2 ULP vs O3 applies only to the published tabulated Basic RSS/WCA and Engineering dimensions[] vectors (symmetric, asymmetric, 1σ, 3σ, uniform). It is not a whole-domain stack guarantee and does not cover GD&T or 3-D loops.",
  "commands": {
    "regenerate_table": "python3 generate-tolerance-stackup-o3.py",
    "regenerate_table_repo": "python3 scripts/lib/cvp/oracles/generate-tolerance-stackup-o3.py",
    "independent_rest": "Compare POST /api/v1/calc/tolerance-stackup against /developers/cvp/reproduce/tolerance-stackup-o3-tables.json",
    "run_cvp": "npm run cvp:run -- --capability engineering.tolerance.stackup",
    "rest_example": "POST https://www.calculatorx.com/api/v1/calc/tolerance-stackup"
  },
  "public_files": {
    "table": "/developers/cvp/reproduce/tolerance-stackup-o3-tables.json",
    "table_url": "https://www.calculatorx.com/developers/cvp/reproduce/tolerance-stackup-o3-tables.json",
    "generator": "/developers/cvp/reproduce/generate-tolerance-stackup-o3.py",
    "generator_url": "https://www.calculatorx.com/developers/cvp/reproduce/generate-tolerance-stackup-o3.py",
    "checker": "/developers/cvp/reproduce/check-math-o3-rest.py",
    "checker_url": "https://www.calculatorx.com/developers/cvp/reproduce/check-math-o3-rest.py",
    "manifest": "/evidence/engineering.tolerance.stackup/1.4.0.cvp.json",
    "this_file": "/evidence/engineering.tolerance.stackup/reproduce.json"
  },
  "result_summary": {
    "passed": 10,
    "total": 10,
    "failed": 0,
    "max_error_ulp": 1,
    "threshold_ulp": 2,
    "max_threshold_ulp": 2
  },
  "vectors": [
    {
      "id": "o3-rss",
      "kind": "basic-rss",
      "inputs": {
        "mode": "rss",
        "tol": [
          0.1,
          0.2,
          0.1
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "basic",
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4
      },
      "actual": {
        "mode": "rss",
        "profile": "basic",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4,
        "stack_range": 0.8,
        "stack_half_range": 0.4,
        "stack_nom": null,
        "stack_stat_center": null,
        "stack_center_shift": null,
        "stack_min": null,
        "stack_max": null,
        "rss_over_wca": 0.6123724356957946,
        "dimensions": null
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-wca",
      "kind": "basic-wca",
      "inputs": {
        "mode": "worst_case",
        "tol1": 0.1,
        "tol2": 0.2,
        "tol3": 0.1
      },
      "expected_f64": {
        "mode": "worst_case",
        "profile": "basic",
        "stack": 0.4,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4
      },
      "actual": {
        "mode": "worst_case",
        "profile": "basic",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.4,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4,
        "stack_range": 0.8,
        "stack_half_range": 0.4,
        "stack_nom": null,
        "stack_stat_center": null,
        "stack_center_shift": null,
        "stack_min": null,
        "stack_max": null,
        "rss_over_wca": 0.6123724356957946,
        "dimensions": null
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-rss-fields",
      "kind": "basic-rss-fields",
      "inputs": {
        "mode": "rss",
        "tol1": 0.1,
        "tol2": 0.2,
        "tol3": 0.1
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "basic",
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4
      },
      "actual": {
        "mode": "rss",
        "profile": "basic",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4,
        "stack_range": 0.8,
        "stack_half_range": 0.4,
        "stack_nom": null,
        "stack_stat_center": null,
        "stack_center_shift": null,
        "stack_min": null,
        "stack_max": null,
        "rss_over_wca": 0.6123724356957946,
        "dimensions": null
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-symmetric",
      "kind": "engineering-symmetric",
      "inputs": {
        "mode": "rss",
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+"
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-"
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+"
          }
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "engineering",
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4,
        "stack_nom": 8,
        "stack_stat_center": 8,
        "stack_min": 7.6,
        "stack_max": 8.4
      },
      "actual": {
        "mode": "rss",
        "profile": "engineering",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.4,
        "stack_worst_plus": 0.4,
        "stack_worst_minus": 0.4,
        "stack_range": 0.8,
        "stack_half_range": 0.4,
        "stack_nom": 8,
        "stack_stat_center": 8,
        "stack_center_shift": 0,
        "stack_min": 7.6,
        "stack_max": 8.4,
        "rss_over_wca": 0.6123724356957946,
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": 10,
            "center_shift": 0,
            "signed_center": 10,
            "delta_max": 0.1,
            "delta_min": -0.1,
            "tol_rss": 0.1
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": -5,
            "center_shift": 0,
            "signed_center": -5,
            "delta_max": 0.2,
            "delta_min": -0.2,
            "tol_rss": 0.2
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": 3,
            "center_shift": 0,
            "signed_center": 3,
            "delta_max": 0.1,
            "delta_min": -0.1,
            "tol_rss": 0.1
          }
        ]
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-asymmetric",
      "kind": "engineering-asymmetric-wca",
      "inputs": {
        "mode": "worst_case",
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.05,
            "tol_minus": 0.15,
            "direction": "+"
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-"
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+"
          }
        ]
      },
      "expected_f64": {
        "mode": "worst_case",
        "profile": "engineering",
        "stack": 0.45,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.45,
        "stack_worst_plus": 0.35000000000000003,
        "stack_worst_minus": 0.45,
        "stack_nom": 8,
        "stack_stat_center": 8,
        "stack_min": 7.55,
        "stack_max": 8.35
      },
      "actual": {
        "mode": "worst_case",
        "profile": "engineering",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.44999999999999996,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.44999999999999996,
        "stack_worst_plus": 0.35,
        "stack_worst_minus": 0.44999999999999996,
        "stack_range": 0.7999999999999999,
        "stack_half_range": 0.39999999999999997,
        "stack_nom": 8,
        "stack_stat_center": 8,
        "stack_center_shift": 0,
        "stack_min": 7.55,
        "stack_max": 8.35,
        "rss_over_wca": 0.5443310539518175,
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.05,
            "tol_minus": 0.15,
            "direction": "+",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": 10,
            "center_shift": 0,
            "signed_center": 10,
            "delta_max": 0.05,
            "delta_min": -0.15,
            "tol_rss": 0.1
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": -5,
            "center_shift": 0,
            "signed_center": -5,
            "delta_max": 0.2,
            "delta_min": -0.2,
            "tol_rss": 0.2
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": 3,
            "center_shift": 0,
            "signed_center": 3,
            "delta_max": 0.1,
            "delta_min": -0.1,
            "tol_rss": 0.1
          }
        ]
      },
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-asymm-rss",
      "kind": "engineering-asymmetric-rss",
      "inputs": {
        "mode": "rss",
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.05,
            "tol_minus": 0.15,
            "direction": "+"
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-"
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+"
          }
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "engineering",
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.45,
        "stack_worst_plus": 0.35000000000000003,
        "stack_worst_minus": 0.45,
        "stack_nom": 8,
        "stack_stat_center": 8,
        "stack_min": 7.55,
        "stack_max": 8.35
      },
      "actual": {
        "mode": "rss",
        "profile": "engineering",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.24494897427831783,
        "stack_rss": 0.24494897427831783,
        "stack_worst": 0.44999999999999996,
        "stack_worst_plus": 0.35,
        "stack_worst_minus": 0.44999999999999996,
        "stack_range": 0.7999999999999999,
        "stack_half_range": 0.39999999999999997,
        "stack_nom": 8,
        "stack_stat_center": 8,
        "stack_center_shift": 0,
        "stack_min": 7.55,
        "stack_max": 8.35,
        "rss_over_wca": 0.5443310539518175,
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.05,
            "tol_minus": 0.15,
            "direction": "+",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": 10,
            "center_shift": 0,
            "signed_center": 10,
            "delta_max": 0.05,
            "delta_min": -0.15,
            "tol_rss": 0.1
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": -5,
            "center_shift": 0,
            "signed_center": -5,
            "delta_max": 0.2,
            "delta_min": -0.2,
            "tol_rss": 0.2
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+",
            "statistical_basis": "magnitude",
            "distribution": "magnitude",
            "signed_nom": 3,
            "center_shift": 0,
            "signed_center": 3,
            "delta_max": 0.1,
            "delta_min": -0.1,
            "tol_rss": 0.1
          }
        ]
      },
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-1sigma",
      "kind": "engineering-1sigma",
      "inputs": {
        "mode": "rss",
        "dimensions": [
          {
            "name": "A",
            "nom": 0,
            "tol": 0.3,
            "direction": "+",
            "statistical_basis": "1sigma"
          }
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "engineering",
        "stack": 0.3,
        "stack_rss": 0.3,
        "stack_worst": 0.3,
        "stack_worst_plus": 0.3,
        "stack_worst_minus": 0.3,
        "stack_nom": 0,
        "stack_stat_center": 0,
        "stack_min": -0.3,
        "stack_max": 0.3
      },
      "actual": {
        "mode": "rss",
        "profile": "engineering",
        "n": 1,
        "tol": [
          0.3
        ],
        "stack": 0.3,
        "stack_rss": 0.3,
        "stack_worst": 0.3,
        "stack_worst_plus": 0.3,
        "stack_worst_minus": 0.3,
        "stack_range": 0.6,
        "stack_half_range": 0.3,
        "stack_nom": 0,
        "stack_stat_center": 0,
        "stack_center_shift": 0,
        "stack_min": -0.3,
        "stack_max": 0.3,
        "rss_over_wca": 1,
        "dimensions": [
          {
            "name": "A",
            "nom": 0,
            "tol_plus": 0.3,
            "tol_minus": 0.3,
            "direction": "+",
            "statistical_basis": "1sigma",
            "distribution": "1sigma",
            "signed_nom": 0,
            "center_shift": 0,
            "signed_center": 0,
            "delta_max": 0.3,
            "delta_min": -0.3,
            "tol_rss": 0.3
          }
        ]
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-3sigma",
      "kind": "engineering-3sigma",
      "inputs": {
        "mode": "rss",
        "dimensions": [
          {
            "name": "A",
            "nom": 0,
            "tol": 0.3,
            "direction": "+",
            "statistical_basis": "3sigma"
          }
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "engineering",
        "stack": 0.09999999999999999,
        "stack_rss": 0.09999999999999999,
        "stack_worst": 0.3,
        "stack_worst_plus": 0.3,
        "stack_worst_minus": 0.3,
        "stack_nom": 0,
        "stack_stat_center": 0,
        "stack_min": -0.3,
        "stack_max": 0.3
      },
      "actual": {
        "mode": "rss",
        "profile": "engineering",
        "n": 1,
        "tol": [
          0.3
        ],
        "stack": 0.09999999999999999,
        "stack_rss": 0.09999999999999999,
        "stack_worst": 0.3,
        "stack_worst_plus": 0.3,
        "stack_worst_minus": 0.3,
        "stack_range": 0.6,
        "stack_half_range": 0.3,
        "stack_nom": 0,
        "stack_stat_center": 0,
        "stack_center_shift": 0,
        "stack_min": -0.3,
        "stack_max": 0.3,
        "rss_over_wca": 0.3333333333333333,
        "dimensions": [
          {
            "name": "A",
            "nom": 0,
            "tol_plus": 0.3,
            "tol_minus": 0.3,
            "direction": "+",
            "statistical_basis": "3sigma",
            "distribution": "3sigma",
            "signed_nom": 0,
            "center_shift": 0,
            "signed_center": 0,
            "delta_max": 0.3,
            "delta_min": -0.3,
            "tol_rss": 0.09999999999999999
          }
        ]
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-uniform",
      "kind": "engineering-uniform",
      "inputs": {
        "mode": "rss",
        "dimensions": [
          {
            "name": "A",
            "nom": 0,
            "tol": 0.3,
            "direction": "+",
            "statistical_basis": "uniform"
          }
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "engineering",
        "stack": 0.17320508075688773,
        "stack_rss": 0.17320508075688773,
        "stack_worst": 0.3,
        "stack_worst_plus": 0.3,
        "stack_worst_minus": 0.3,
        "stack_nom": 0,
        "stack_stat_center": 0,
        "stack_min": -0.3,
        "stack_max": 0.3
      },
      "actual": {
        "mode": "rss",
        "profile": "engineering",
        "n": 1,
        "tol": [
          0.3
        ],
        "stack": 0.17320508075688773,
        "stack_rss": 0.17320508075688773,
        "stack_worst": 0.3,
        "stack_worst_plus": 0.3,
        "stack_worst_minus": 0.3,
        "stack_range": 0.6,
        "stack_half_range": 0.3,
        "stack_nom": 0,
        "stack_stat_center": 0,
        "stack_center_shift": 0,
        "stack_min": -0.3,
        "stack_max": 0.3,
        "rss_over_wca": 0.5773502691896258,
        "dimensions": [
          {
            "name": "A",
            "nom": 0,
            "tol_plus": 0.3,
            "tol_minus": 0.3,
            "direction": "+",
            "statistical_basis": "uniform",
            "distribution": "uniform",
            "signed_nom": 0,
            "center_shift": 0,
            "signed_center": 0,
            "delta_max": 0.3,
            "delta_min": -0.3,
            "tol_rss": 0.17320508075688773
          }
        ]
      },
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-eng-uniform-center",
      "kind": "engineering-uniform-center",
      "inputs": {
        "mode": "rss",
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.05,
            "tol_minus": 0.15,
            "direction": "+",
            "statistical_basis": "uniform"
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-",
            "statistical_basis": "uniform"
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+",
            "statistical_basis": "uniform"
          }
        ]
      },
      "expected_f64": {
        "mode": "rss",
        "profile": "engineering",
        "stack": 0.1414213562373095,
        "stack_rss": 0.1414213562373095,
        "stack_worst": 0.45,
        "stack_worst_plus": 0.35000000000000003,
        "stack_worst_minus": 0.45,
        "stack_nom": 8,
        "stack_stat_center": 7.95,
        "stack_min": 7.55,
        "stack_max": 8.35
      },
      "actual": {
        "mode": "rss",
        "profile": "engineering",
        "n": 3,
        "tol": [
          0.1,
          0.2,
          0.1
        ],
        "stack": 0.14142135623730953,
        "stack_rss": 0.14142135623730953,
        "stack_worst": 0.44999999999999996,
        "stack_worst_plus": 0.35,
        "stack_worst_minus": 0.44999999999999996,
        "stack_range": 0.7999999999999999,
        "stack_half_range": 0.39999999999999997,
        "stack_nom": 8,
        "stack_stat_center": 7.949999999999999,
        "stack_center_shift": -0.05000000000000071,
        "stack_min": 7.55,
        "stack_max": 8.35,
        "rss_over_wca": 0.31426968052735454,
        "dimensions": [
          {
            "name": "A",
            "nom": 10,
            "tol_plus": 0.05,
            "tol_minus": 0.15,
            "direction": "+",
            "statistical_basis": "uniform",
            "distribution": "uniform",
            "signed_nom": 10,
            "center_shift": -0.049999999999999996,
            "signed_center": 9.95,
            "delta_max": 0.05,
            "delta_min": -0.15,
            "tol_rss": 0.05773502691896258
          },
          {
            "name": "B",
            "nom": 5,
            "tol_plus": 0.2,
            "tol_minus": 0.2,
            "direction": "-",
            "statistical_basis": "uniform",
            "distribution": "uniform",
            "signed_nom": -5,
            "center_shift": 0,
            "signed_center": -5,
            "delta_max": 0.2,
            "delta_min": -0.2,
            "tol_rss": 0.11547005383792516
          },
          {
            "name": "C",
            "nom": 3,
            "tol_plus": 0.1,
            "tol_minus": 0.1,
            "direction": "+",
            "statistical_basis": "uniform",
            "distribution": "uniform",
            "signed_nom": 3,
            "center_shift": 0,
            "signed_center": 3,
            "delta_max": 0.1,
            "delta_min": -0.1,
            "tol_rss": 0.05773502691896258
          }
        ]
      },
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    }
  ]
}
