{
  "capability_id": "math.divide",
  "calculation_version": "1.0.5",
  "protocol_version": "1.0.0-proposed",
  "protocol_document_status": "proposed",
  "verification_revision": "2026-09-08.exact-contract",
  "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 published tabulated quotient vectors (1/3, 100/7, 1.005/1, 1/1e-300, (2^53−1)/7). Long-division vectors are exact integer q,r (Python int divmod). This is not a whole-domain guarantee.",
  "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 divide",
    "run_cvp": "npm run cvp:run -- --capability math.divide",
    "rest_example": "POST https://www.calculatorx.com/api/v1/calc/division"
  },
  "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.divide/1.0.5.cvp.json",
    "this_file": "/evidence/math.divide/reproduce.json"
  },
  "result_summary": {
    "passed": 9,
    "total": 9,
    "failed": 0,
    "max_error_ulp": 0,
    "threshold_ulp": 2,
    "max_threshold_ulp": 2
  },
  "vectors": [
    {
      "id": "o3-div-1-3",
      "kind": "quotient",
      "inputs": {
        "a": 1,
        "b": 3,
        "mode": "quotient"
      },
      "expected_f64": 0.3333333333333333,
      "expected_decimal": "0.3333333333333333333333333333333333333333",
      "actual": 0.3333333333333333,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-100-7",
      "kind": "quotient",
      "inputs": {
        "a": 100,
        "b": 7,
        "mode": "quotient"
      },
      "expected_f64": 14.285714285714286,
      "expected_decimal": "14.28571428571428571428571428571428571429",
      "actual": 14.285714285714286,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-1p005",
      "kind": "quotient",
      "inputs": {
        "a": 1.005,
        "b": 1,
        "mode": "quotient",
        "decimals": 2
      },
      "expected_f64": 1.005,
      "expected_decimal": "1.004999999999999893418589635984972119331",
      "actual": 1.005,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-tiny",
      "kind": "quotient",
      "inputs": {
        "a": 1,
        "b": 1e-300,
        "mode": "quotient"
      },
      "expected_f64": 9.999999999999999e+299,
      "expected_decimal": "9.999999999999999749409081647912409422619e+299",
      "actual": 9.999999999999999e+299,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-max-safe",
      "kind": "quotient",
      "inputs": {
        "a": 9007199254740991,
        "b": 7,
        "mode": "quotient"
      },
      "expected_f64": 1286742750677284.5,
      "expected_decimal": "1286742750677284.428571428571428571428571",
      "actual": 1286742750677284.5,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-long-100-7",
      "kind": "long-normal",
      "inputs": {
        "a": 100,
        "b": 7,
        "mode": "long"
      },
      "expected_f64": 14.285714285714286,
      "expected_decimal": "14.28571428571428647558150260010734200478",
      "actual": 14.285714285714286,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-long-past-safe",
      "kind": "long-large-integer",
      "inputs": {
        "a": "9007199254740993",
        "b": 1,
        "mode": "long"
      },
      "expected_f64": 0,
      "actual": 0,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-long-huge",
      "kind": "long-large-integer",
      "inputs": {
        "a": "9007199254740993123456789",
        "b": 7,
        "mode": "long"
      },
      "expected_f64": 0,
      "actual": 0,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    },
    {
      "id": "o3-div-long-48",
      "kind": "long-boundary",
      "inputs": {
        "a": "100000000000000000000000000000000000000000000000",
        "b": 3,
        "mode": "long"
      },
      "expected_f64": 0,
      "actual": 0,
      "error_ulp": 0,
      "threshold_ulp": 2,
      "ok": true
    }
  ]
}
