{
  "capability_id": "math.cos",
  "calculation_version": "1.0.5",
  "protocol_version": "1.0.0-proposed",
  "protocol_document_status": "proposed",
  "verification_revision": "2026-09-08.xcal",
  "oracle": {
    "class": "O3",
    "library": "mpmath 1.4.1",
    "mpmath_dps": 80,
    "backend": "python",
    "rounding": "round-to-nearest-binary64",
    "generator_id": "math-mpmath-o3",
    "generator_version": "1.0.0",
    "generator_sha256": "3453ec60bd03738a1f1f3723baed7e617ff49466452efab1844fe68b8f654cea",
    "table_sha256": "efdad939a92a67df1f3995db36c52bb87f428a59fc73568f789c02540f4372ee",
    "seed": "20260907",
    "independent_of_iut": true
  },
  "claim_scope": "≤2 ULP vs O3 applies to the 18 published tabulated vectors (common angles 0°…180° plus 8 seeded random angles in (−50°, 50°)). It is not a guarantee over the entire real line, including huge angles or unlisted neighborhoods of zeros.",
  "commands": {
    "regenerate_table": "python3 generate-math-o3.py",
    "regenerate_table_repo": "python3 scripts/lib/cvp/oracles/generate-math-o3.py",
    "independent_rest": "python3 check-math-o3-rest.py cos",
    "run_cvp": "npm run cvp:run -- --capability math.cos",
    "rest_example": "POST https://www.calculatorx.com/api/v1/calc/cos"
  },
  "public_files": {
    "table": "/developers/cvp/reproduce/math-o3-tables.json",
    "table_url": "https://www.calculatorx.com/developers/cvp/reproduce/math-o3-tables.json",
    "generator": "/developers/cvp/reproduce/generate-math-o3.py",
    "generator_url": "https://www.calculatorx.com/developers/cvp/reproduce/generate-math-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/math.cos/1.0.5.cvp.json",
    "this_file": "/evidence/math.cos/reproduce.json"
  },
  "result_summary": {
    "passed": 18,
    "total": 18,
    "failed": 0,
    "max_error_ulp": 0,
    "threshold_ulp": 2,
    "max_threshold_ulp": 2
  },
  "vectors": [
    {
      "id": "o3-cos-0",
      "kind": "angle",
      "inputs": {
        "theta": 0,
        "unit": "deg"
      },
      "expected_f64": 1,
      "expected_decimal": "1.000000000000000000000000000000000000000",
      "actual": 1,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-30",
      "kind": "angle",
      "inputs": {
        "theta": 30,
        "unit": "deg"
      },
      "expected_f64": 0.8660254037844386,
      "expected_decimal": "0.8660254037844386467637231707529361834714",
      "actual": 0.8660254037844386,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-45",
      "kind": "angle",
      "inputs": {
        "theta": 45,
        "unit": "deg"
      },
      "expected_f64": 0.7071067811865476,
      "expected_decimal": "0.7071067811865475244008443621048490392848",
      "actual": 0.7071067811865476,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-60",
      "kind": "angle",
      "inputs": {
        "theta": 60,
        "unit": "deg"
      },
      "expected_f64": 0.5,
      "expected_decimal": "0.5000000000000000000000000000000000000000",
      "actual": 0.5,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-90",
      "kind": "angle",
      "inputs": {
        "theta": 90,
        "unit": "deg"
      },
      "expected_f64": 0,
      "expected_decimal": "0.0",
      "actual": 0,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-180",
      "kind": "angle",
      "inputs": {
        "theta": 180,
        "unit": "deg"
      },
      "expected_f64": -1,
      "expected_decimal": "-1.000000000000000000000000000000000000000",
      "actual": -1,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-33.3",
      "kind": "angle",
      "inputs": {
        "theta": 33.3,
        "unit": "deg"
      },
      "expected_f64": 0.8358073613682703,
      "expected_decimal": "0.8358073613682702857094153628941470787928",
      "actual": 0.8358073613682703,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-12.5",
      "kind": "angle",
      "inputs": {
        "theta": 12.5,
        "unit": "deg"
      },
      "expected_f64": 0.9762960071199334,
      "expected_decimal": "0.9762960071199333659708864896054275771653",
      "actual": 0.9762960071199334,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos--30",
      "kind": "angle",
      "inputs": {
        "theta": -30,
        "unit": "deg"
      },
      "expected_f64": 0.8660254037844386,
      "expected_decimal": "0.8660254037844386467637231707529361834714",
      "actual": 0.8660254037844386,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-15",
      "kind": "angle",
      "inputs": {
        "theta": 15,
        "unit": "deg"
      },
      "expected_f64": 0.9659258262890683,
      "expected_decimal": "0.9659258262890682867497431997288973676339",
      "actual": 0.9659258262890683,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-00",
      "kind": "random-interior",
      "inputs": {
        "theta": -9.559773420915008,
        "unit": "deg"
      },
      "expected_f64": 0.9861128800941029,
      "expected_decimal": "0.9861128800941028652908262453963846876746",
      "actual": 0.9861128800941029,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-01",
      "kind": "random-interior",
      "inputs": {
        "theta": 41.753348731435835,
        "unit": "deg"
      },
      "expected_f64": 0.7460184554083706,
      "expected_decimal": "0.7460184554083705867088104707357776419516",
      "actual": 0.7460184554083706,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-02",
      "kind": "random-interior",
      "inputs": {
        "theta": 16.403990518301725,
        "unit": "deg"
      },
      "expected_f64": 0.9592943077850056,
      "expected_decimal": "0.9592943077850055966326827207755255900343",
      "actual": 0.9592943077850056,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-03",
      "kind": "random-interior",
      "inputs": {
        "theta": -24.075726536102593,
        "unit": "deg"
      },
      "expected_f64": 0.9130070852711516,
      "expected_decimal": "0.9130070852711515531889422578244704191104",
      "actual": 0.9130070852711516,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-04",
      "kind": "random-interior",
      "inputs": {
        "theta": -25.105708884075284,
        "unit": "deg"
      },
      "expected_f64": 0.9055265277845048,
      "expected_decimal": "0.9055265277845048629611810932764418743549",
      "actual": 0.9055265277845048,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-05",
      "kind": "random-interior",
      "inputs": {
        "theta": 43.52653187233955,
        "unit": "deg"
      },
      "expected_f64": 0.7250555379109475,
      "expected_decimal": "0.7250555379109474598894102059111360381079",
      "actual": 0.7250555379109475,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-06",
      "kind": "random-interior",
      "inputs": {
        "theta": 24.071603268384933,
        "unit": "deg"
      },
      "expected_f64": 0.9130364404111473,
      "expected_decimal": "0.9130364404111472886583069181110995588040",
      "actual": 0.9130364404111473,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-cos-rand-07",
      "kind": "random-interior",
      "inputs": {
        "theta": 9.037105715833604,
        "unit": "deg"
      },
      "expected_f64": 0.9875868238749216,
      "expected_decimal": "0.9875868238749215616683168383263587344341",
      "actual": 0.9875868238749216,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    }
  ]
}
