{
  "capability_id": "math.tan",
  "calculation_version": "1.0.4",
  "protocol_version": "1.0.0-proposed",
  "protocol_document_status": "proposed",
  "verification_revision": "2026-09-08.policy",
  "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 16 published tabulated vectors (common angles away from poles plus 8 seeded random angles in (−50°, 50°)). It is not a guarantee over the entire real line, including poles, 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 tan",
    "run_cvp": "npm run cvp:run -- --capability math.tan",
    "rest_example": "POST https://www.calculatorx.com/api/v1/calc/tan"
  },
  "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.tan/1.0.4.cvp.json",
    "this_file": "/evidence/math.tan/reproduce.json"
  },
  "result_summary": {
    "passed": 16,
    "total": 16,
    "failed": 0,
    "max_error_ulp": 1,
    "threshold_ulp": 2,
    "max_threshold_ulp": 2
  },
  "vectors": [
    {
      "id": "o3-tan-0",
      "kind": "angle",
      "inputs": {
        "theta": 0,
        "unit": "deg"
      },
      "expected_f64": 0,
      "expected_decimal": "0.0",
      "actual": 0,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-30",
      "kind": "angle",
      "inputs": {
        "theta": 30,
        "unit": "deg"
      },
      "expected_f64": 0.5773502691896257,
      "expected_decimal": "0.5773502691896257645091487805019574556476",
      "actual": 0.5773502691896258,
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-45",
      "kind": "angle",
      "inputs": {
        "theta": 45,
        "unit": "deg"
      },
      "expected_f64": 1,
      "expected_decimal": "1.000000000000000000000000000000000000000",
      "actual": 1,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-60",
      "kind": "angle",
      "inputs": {
        "theta": 60,
        "unit": "deg"
      },
      "expected_f64": 1.7320508075688772,
      "expected_decimal": "1.732050807568877293527446341505872366943",
      "actual": 1.7320508075688772,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-33.3",
      "kind": "angle",
      "inputs": {
        "theta": 33.3,
        "unit": "deg"
      },
      "expected_f64": 0.6568772224012793,
      "expected_decimal": "0.6568772224012793058993686214134783616336",
      "actual": 0.6568772224012792,
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-12.5",
      "kind": "angle",
      "inputs": {
        "theta": 12.5,
        "unit": "deg"
      },
      "expected_f64": 0.2216946626429399,
      "expected_decimal": "0.2216946626429399015774175351629076072995",
      "actual": 0.2216946626429399,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan--30",
      "kind": "angle",
      "inputs": {
        "theta": -30,
        "unit": "deg"
      },
      "expected_f64": -0.5773502691896257,
      "expected_decimal": "-0.5773502691896257645091487805019574556476",
      "actual": -0.5773502691896258,
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-15",
      "kind": "angle",
      "inputs": {
        "theta": 15,
        "unit": "deg"
      },
      "expected_f64": 0.2679491924311227,
      "expected_decimal": "0.2679491924311227064725536584941276330572",
      "actual": 0.2679491924311227,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-00",
      "kind": "random-interior",
      "inputs": {
        "theta": -9.521018178202212,
        "unit": "deg"
      },
      "expected_f64": -0.16771974138327453,
      "expected_decimal": "-0.1677197413832745375180055677494087768826",
      "actual": -0.16771974138327453,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-01",
      "kind": "random-interior",
      "inputs": {
        "theta": -49.17627475224435,
        "unit": "deg"
      },
      "expected_f64": -1.1575417700993667,
      "expected_decimal": "-1.157541770099366585757296964226963485660",
      "actual": -1.1575417700993667,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-02",
      "kind": "random-interior",
      "inputs": {
        "theta": -15.125182247720659,
        "unit": "deg"
      },
      "expected_f64": -0.27029227487610746,
      "expected_decimal": "-0.2702922748761074788453417315550358776229",
      "actual": -0.27029227487610746,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-03",
      "kind": "random-interior",
      "inputs": {
        "theta": -20.3740899451077,
        "unit": "deg"
      },
      "expected_f64": -0.371381992439033,
      "expected_decimal": "-0.3713819924390330019484798354167363428041",
      "actual": -0.37138199243903297,
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-04",
      "kind": "random-interior",
      "inputs": {
        "theta": 41.5409168926999,
        "unit": "deg"
      },
      "expected_f64": 0.8859991849240253,
      "expected_decimal": "0.8859991849240252437343455376912939508883",
      "actual": 0.8859991849240252,
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-05",
      "kind": "random-interior",
      "inputs": {
        "theta": 18.29761858098209,
        "unit": "deg"
      },
      "expected_f64": 0.3306722711014023,
      "expected_decimal": "0.3306722711014022785131506591232206820565",
      "actual": 0.3306722711014023,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-06",
      "kind": "random-interior",
      "inputs": {
        "theta": -32.824693503789604,
        "unit": "deg"
      },
      "expected_f64": -0.6450661727384714,
      "expected_decimal": "-0.6450661727384714584971252542617801539225",
      "actual": -0.6450661727384714,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-tan-rand-07",
      "kind": "random-interior",
      "inputs": {
        "theta": 0.6524018943309784,
        "unit": "deg"
      },
      "expected_f64": 0.011387053231385207,
      "expected_decimal": "0.01138705323138520762201678784849229637230",
      "actual": 0.011387053231385206,
      "error_ulp": 1,
      "threshold_ulp": 2,
      "ok": true
    }
  ]
}
