{
  "capability_id": "math.divide",
  "tool_id": "division",
  "engine": "divide",
  "calculation_version": "1.0.5",
  "generated_at": "2026-09-16T22:03:43.783Z",
  "engine_build": "2026-09-10",
  "test_count": 34,
  "passed": 34,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 25,
      "passed": 25
    },
    "boundary": {
      "total": 9,
      "passed": 9
    },
    "property": {
      "total": 0,
      "passed": 0
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/math/division",
  "api": "https://www.calculatorx.com/api/v1/calc/division",
  "schema_input": "https://www.calculatorx.com/schemas/math.divide.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.divide.output.json",
  "assumptions": [
    "Quotient mode divides in IEEE-754 binary64, then rounds the display with Number.prototype.toFixed (round half away from 0 on that binary64 value). Trailing zeros may be stripped.",
    "The displayed decimal is not claimed to be an exact repeating expansion.",
    "REST field exact is true iff ieee_value equals the real number a÷b for those binary64 operands. It is not display round-trip and not integer divisibility. Example: (2^53−1)÷7 has remainder 3, so exact is false even when toFixed round-trips.",
    "REST field display_exact is true iff Number(ieee_value.toFixed(n)) === ieee_value (display did not change the binary64 value).",
    "Long division uses exact BigInt Euclidean division for non-negative integers: a, b ∈ ℤ≥0, b > 0. Integers are limited to 48 decimal digits to bound computation and long-division step output (a CalculatorX product contract, not a JavaScript BigInt limit).",
    "Remainder satisfies 0 ≤ r < b in long division (verified as b·q + r = a in BigInt). Long-mode exact is true iff remainder is 0.",
    "Quotient mode does not silently round plain integer tokens outside ±(2^53−1); those inputs return INTEGER_OUT_OF_SAFE_RANGE. Send large integers as decimal strings and use Long division for an exact result.",
    "REST/JSON reports ieee_value (raw binary64, or null when the long-division operands do not fit in a safe integer), decimal_value (display string), precision, rounding, exact (mathematical vs binary64 operands), display_exact (toFixed round-trip), exact_value (a/b when both are integers), integer_quotient/remainder for integer quotient-mode operands, and integer_engine=bigint in long mode."
  ],
  "limitations": [
    "b = 0 → DIVISION_BY_ZERO",
    "Long mode uses BigInt integers only"
  ],
  "boundary_conditions": [
    "b = 0 → DIVISION_BY_ZERO",
    "Non-finite a or b → INVALID_NUMBER / MISSING_REQUIRED_INPUT",
    "Non-finite binary64 quotient (overflow) → INVALID_NUMBER",
    "Long mode: negatives or non-integers → INVALID_INPUT (use Quotient mode)",
    "Long mode: more than 48 digits → INTEGER_TOO_LONG (product limit to bound computation and step output)",
    "Quotient mode: plain integer token outside ±(2^53−1) → INTEGER_OUT_OF_SAFE_RANGE",
    "decimals missing or blank → default 8; otherwise must be an integer in 0…16 or DECIMAL_PLACES_OUT_OF_RANGE (no silent clamp)"
  ],
  "sources": [
    {
      "title": "ECMAScript Language Specification",
      "section": "Number.prototype.toFixed ( fractionDigits )",
      "url": "https://tc39.es/ecma262/#sec-number.prototype.tofixed",
      "supports": "Quotient-mode display rounding after binary64 division",
      "kind": "standard"
    },
    {
      "title": "ECMAScript Language Specification",
      "section": "Number type (IEEE-754 binary64)",
      "url": "https://tc39.es/ecma262/#sec-ecmascript-language-types-number-type",
      "supports": "Quotient mode uses the ECMAScript Number type, which is IEEE-754 binary64",
      "kind": "standard"
    },
    {
      "title": "IEEE Std 754-2019",
      "section": "IEEE Standard for Floating-Point Arithmetic",
      "url": "https://standards.ieee.org/ieee/754/6210/",
      "supports": "Binary floating-point format used by quotient mode",
      "kind": "standard"
    },
    {
      "title": "Division theorem (Euclidean division)",
      "section": "For integers a and b > 0 there exist unique q, r with a = bq + r and 0 ≤ r < b",
      "url": "https://proofwiki.org/wiki/Division_Theorem",
      "supports": "Long-division identity a = b·q + r with 0 ≤ r < b",
      "kind": "definition"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:05136052816fe802b95ce1f369c0341dfe5f63760c652c650da94052ac1624f2",
  "tests": [
    {
      "id": "exact-int",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 8,
        "b": 4,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "2",
        "exact": true,
        "ieee_value": 2
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 8,
        "b": 4,
        "value": 2,
        "ieee_value": 2,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "2",
        "exact": true,
        "display_exact": true,
        "exact_value": "8/4",
        "integer_quotient": 2,
        "remainder": 0
      },
      "tol": 0
    },
    {
      "id": "decimal-100-div-7",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 100,
        "b": 7,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "14.28571429",
        "exact": false,
        "precision": 8
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 100,
        "b": 7,
        "value": 14.285714285714286,
        "ieee_value": 14.285714285714286,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "14.28571429",
        "exact": false,
        "display_exact": false,
        "exact_value": "100/7",
        "integer_quotient": 14,
        "remainder": 2
      },
      "tol": 0
    },
    {
      "id": "decimal-ieee",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 100,
        "b": 7,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": 14.285714285714285,
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 100,
        "b": 7,
        "value": 14.285714285714286,
        "ieee_value": 14.285714285714286,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "14.28571429",
        "exact": false,
        "display_exact": false,
        "exact_value": "100/7",
        "integer_quotient": 14,
        "remainder": 2
      },
      "tol": 1e-12
    },
    {
      "id": "one-third",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 1,
        "b": 3,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "0.33333333",
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 1,
        "b": 3,
        "value": 0.3333333333333333,
        "ieee_value": 0.3333333333333333,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "0.33333333",
        "exact": false,
        "display_exact": false,
        "exact_value": "1/3",
        "integer_quotient": 0,
        "remainder": 1
      },
      "tol": null
    },
    {
      "id": "two-thirds",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 2,
        "b": 3,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "0.66666667",
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 2,
        "b": 3,
        "value": 0.6666666666666666,
        "ieee_value": 0.6666666666666666,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "0.66666667",
        "exact": false,
        "display_exact": false,
        "exact_value": "2/3",
        "integer_quotient": 0,
        "remainder": 2
      },
      "tol": null
    },
    {
      "id": "zero-dividend",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 0,
        "b": 7,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "0",
        "ieee_value": 0,
        "exact": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 0,
        "b": 7,
        "value": 0,
        "ieee_value": 0,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "0",
        "exact": true,
        "display_exact": true,
        "exact_value": "0/7",
        "integer_quotient": 0,
        "remainder": 0
      },
      "tol": 0
    },
    {
      "id": "div-one",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 7,
        "b": 1,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "7",
        "ieee_value": 7
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 7,
        "b": 1,
        "value": 7,
        "ieee_value": 7,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "7",
        "exact": true,
        "display_exact": true,
        "exact_value": "7/1",
        "integer_quotient": 7,
        "remainder": 0
      },
      "tol": 0
    },
    {
      "id": "div-self",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 7,
        "b": 7,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "1",
        "ieee_value": 1
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 7,
        "b": 7,
        "value": 1,
        "ieee_value": 1,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "1",
        "exact": true,
        "display_exact": true,
        "exact_value": "7/7",
        "integer_quotient": 1,
        "remainder": 0
      },
      "tol": 0
    },
    {
      "id": "neg-dividend",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": -100,
        "b": 7,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "-14.28571429",
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": -100,
        "b": 7,
        "value": -14.285714285714286,
        "ieee_value": -14.285714285714286,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "-14.28571429",
        "exact": false,
        "display_exact": false,
        "exact_value": "-100/7",
        "integer_quotient": -14,
        "remainder": -2
      },
      "tol": null
    },
    {
      "id": "neg-divisor",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 100,
        "b": -7,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "-14.28571429",
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 100,
        "b": -7,
        "value": -14.285714285714286,
        "ieee_value": -14.285714285714286,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "-14.28571429",
        "exact": false,
        "display_exact": false,
        "exact_value": "100/-7",
        "integer_quotient": -14,
        "remainder": 2
      },
      "tol": null
    },
    {
      "id": "neg-both",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": -100,
        "b": -7,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "14.28571429",
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": -100,
        "b": -7,
        "value": 14.285714285714286,
        "ieee_value": 14.285714285714286,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "14.28571429",
        "exact": false,
        "display_exact": false,
        "exact_value": "-100/-7",
        "integer_quotient": 14,
        "remainder": -2
      },
      "tol": null
    },
    {
      "id": "decimals-quot",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 1.5,
        "b": 0.5,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "3",
        "ieee_value": 3,
        "exact": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 1.5,
        "b": 0.5,
        "value": 3,
        "ieee_value": 3,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "3",
        "exact": true,
        "display_exact": true,
        "exact_value": null,
        "integer_quotient": null,
        "remainder": null
      },
      "tol": 0
    },
    {
      "id": "decimals-zero",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 100,
        "b": 7,
        "decimals": 0,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "14",
        "precision": 0,
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 100,
        "b": 7,
        "value": 14.285714285714286,
        "ieee_value": 14.285714285714286,
        "decimal_places": 0,
        "precision": 0,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "14",
        "exact": false,
        "display_exact": false,
        "exact_value": "100/7",
        "integer_quotient": 14,
        "remainder": 2
      },
      "tol": null
    },
    {
      "id": "max-safe-not-math-exact",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 9007199254740991,
        "b": 7,
        "decimals": 8,
        "mode": "quotient"
      },
      "expect": {
        "ieee_value": 1286742750677284.5,
        "exact": false,
        "display_exact": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 9007199254740991,
        "b": 7,
        "value": 1286742750677284.5,
        "ieee_value": 1286742750677284.5,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "1286742750677284.5",
        "exact": false,
        "display_exact": true,
        "exact_value": "9007199254740991/7",
        "integer_quotient": 1286742750677284,
        "remainder": 3
      },
      "tol": null
    },
    {
      "id": "binary64-tofixed-artifact",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 1.005,
        "b": 1,
        "decimals": 2,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "1"
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 1.005,
        "b": 1,
        "value": 1.005,
        "ieee_value": 1.005,
        "decimal_places": 2,
        "precision": 2,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "1",
        "exact": true,
        "display_exact": false,
        "exact_value": null,
        "integer_quotient": null,
        "remainder": null
      },
      "tol": null
    },
    {
      "id": "div-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 100,
        "b": 0,
        "mode": "quotient"
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "Division by zero is undefined."
    },
    {
      "id": "long-100-7",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 100,
        "b": 7,
        "mode": "long"
      },
      "expect": {
        "quotient": 14,
        "remainder": 2,
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": 100,
        "b": 7,
        "value": 14.285714285714286,
        "ieee_value": 14.285714285714286,
        "quotient": 14,
        "remainder": 2,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "14.28571429",
        "exact": false,
        "display_exact": false,
        "exact_value": "100/7",
        "work": "Long division: 100 ÷ 7\n\n      14\n  7 ) 100\n\nStep-by-step:\n  1. Take 1: 7 goes 0 times → 0 × 7 = 0; 1 − 0 = 1\n  2. Take 10: 7 goes 1 time → 1 × 7 = 7; 10 − 7 = 3\n  3. Take 30: 7 goes 4 times → 4 × 7 = 28; 30 − 28 = 2\n\nQuotient = 14\nRemainder = 2\nCheck: 7 × 14 + 2 = 100"
      },
      "tol": 0
    },
    {
      "id": "long-487-32",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 487,
        "b": 32,
        "mode": "long"
      },
      "expect": {
        "quotient": 15,
        "remainder": 7
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": 487,
        "b": 32,
        "value": 15.21875,
        "ieee_value": 15.21875,
        "quotient": 15,
        "remainder": 7,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "15.21875",
        "exact": false,
        "display_exact": true,
        "exact_value": "487/32",
        "work": "Long division: 487 ÷ 32\n\n       15\n  32 ) 487\n\nStep-by-step:\n  1. Take 4: 32 goes 0 times → 0 × 32 = 0; 4 − 0 = 4\n  2. Take 48: 32 goes 1 time → 1 × 32 = 32; 48 − 32 = 16\n  3. Take 167: 32 goes 5 times → 5 × 32 = 160; 167 − 160 = 7\n\nQuotient = 15\nRemainder = 7\nCheck: 32 × 15 + 7 = 487"
      },
      "tol": 0
    },
    {
      "id": "long-zero",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 0,
        "b": 7,
        "mode": "long"
      },
      "expect": {
        "quotient": 0,
        "remainder": 0,
        "exact": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": 0,
        "b": 7,
        "value": 0,
        "ieee_value": 0,
        "quotient": 0,
        "remainder": 0,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "0",
        "exact": true,
        "display_exact": true,
        "exact_value": "0/7",
        "work": "Long division: 0 ÷ 7\n\n      0\n  7 ) 0\n\nStep-by-step:\n  1. Take 0: 7 goes 0 times → 0 × 7 = 0; 0 − 0 = 0\n\nQuotient = 0\nRemainder = 0\nCheck: 7 × 0 + 0 = 0"
      },
      "tol": 0
    },
    {
      "id": "long-a-lt-b",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 3,
        "b": 7,
        "mode": "long"
      },
      "expect": {
        "quotient": 0,
        "remainder": 3
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": 3,
        "b": 7,
        "value": 0.42857142857142855,
        "ieee_value": 0.42857142857142855,
        "quotient": 0,
        "remainder": 3,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "0.42857143",
        "exact": false,
        "display_exact": false,
        "exact_value": "3/7",
        "work": "Long division: 3 ÷ 7\n\n      0\n  7 ) 3\n\nStep-by-step:\n  1. Take 3: 7 goes 0 times → 0 × 7 = 0; 3 − 0 = 3\n\nQuotient = 0\nRemainder = 3\nCheck: 7 × 0 + 3 = 3"
      },
      "tol": 0
    },
    {
      "id": "long-equal",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 7,
        "b": 7,
        "mode": "long"
      },
      "expect": {
        "quotient": 1,
        "remainder": 0,
        "exact": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": 7,
        "b": 7,
        "value": 1,
        "ieee_value": 1,
        "quotient": 1,
        "remainder": 0,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "1",
        "exact": true,
        "display_exact": true,
        "exact_value": "7/7",
        "work": "Long division: 7 ÷ 7\n\n      1\n  7 ) 7\n\nStep-by-step:\n  1. Take 7: 7 goes 1 time → 1 × 7 = 7; 7 − 7 = 0\n\nQuotient = 1\nRemainder = 0\nCheck: 7 × 1 + 0 = 7"
      },
      "tol": 0
    },
    {
      "id": "long-divides",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 8,
        "b": 4,
        "mode": "long"
      },
      "expect": {
        "quotient": 2,
        "remainder": 0,
        "exact": true
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": 8,
        "b": 4,
        "value": 2,
        "ieee_value": 2,
        "quotient": 2,
        "remainder": 0,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "2",
        "exact": true,
        "display_exact": true,
        "exact_value": "8/4",
        "work": "Long division: 8 ÷ 4\n\n      2\n  4 ) 8\n\nStep-by-step:\n  1. Take 8: 4 goes 2 times → 2 × 4 = 8; 8 − 8 = 0\n\nQuotient = 2\nRemainder = 0\nCheck: 4 × 2 + 0 = 8"
      },
      "tol": 0
    },
    {
      "id": "long-reject-decimal",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 1.5,
        "b": 2,
        "mode": "long"
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "Long division mode needs non-negative integers. Use Quotient mode for decimals or negatives."
    },
    {
      "id": "long-reject-negative",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -100,
        "b": 7,
        "mode": "long"
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "Long division mode needs non-negative integers. Use Quotient mode for decimals or negatives."
    },
    {
      "id": "long-div-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 100,
        "b": 0,
        "mode": "long"
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "Division by zero is undefined."
    },
    {
      "id": "long-bigint-past-safe",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": "9007199254740993",
        "b": "1",
        "mode": "long"
      },
      "expect": {
        "quotient": "9007199254740993",
        "remainder": 0,
        "exact": true,
        "integer_engine": "bigint"
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": "9007199254740993",
        "b": 1,
        "value": null,
        "ieee_value": null,
        "quotient": "9007199254740993",
        "remainder": 0,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": null,
        "exact": true,
        "display_exact": null,
        "exact_value": "9007199254740993/1",
        "work": "Long division: 9007199254740993 ÷ 1\n\n      9007199254740993\n  1 ) 9007199254740993\n\nStep-by-step:\n  1. Take 9: 1 goes 9 times → 9 × 1 = 9; 9 − 9 = 0\n  2. Take 0: 1 goes 0 times → 0 × 1 = 0; 0 − 0 = 0\n  3. Take 0: 1 goes 0 times → 0 × 1 = 0; 0 − 0 = 0\n  4. Take 7: 1 goes 7 times → 7 × 1 = 7; 7 − 7 = 0\n  5. Take 1: 1 goes 1 time → 1 × 1 = 1; 1 − 1 = 0\n  6. Take 9: 1 goes 9 times → 9 × 1 = 9; 9 − 9 = 0\n  7. Take 9: 1 goes 9 times → 9 × 1 = 9; 9 − 9 = 0\n  8. Take 2: 1 goes 2 times → 2 × 1 = 2; 2 − 2 = 0\n  9. Take 5: 1 goes 5 times → 5 × 1 = 5; 5 − 5 = 0\n  10. Take 4: 1 goes 4 times → 4 × 1 = 4; 4 − 4 = 0\n  11. Take 7: 1 goes 7 times → 7 × 1 = 7; 7 − 7 = 0\n  12. Take 4: 1 goes 4 times → 4 × 1 = 4; 4 − 4 = 0\n  13. Take 0: 1 goes 0 times → 0 × 1 = 0; 0 − 0 = 0\n  14. Take 9: 1 goes 9 times → 9 × 1 = 9; 9 − 9 = 0\n  15. Take 9: 1 goes 9 times → 9 × 1 = 9; 9 − 9 = 0\n  16. Take 3: 1 goes 3 times → 3 × 1 = 3; 3 − 3 = 0\n\nQuotient = 9007199254740993\nRemainder = 0\nCheck: 1 × 9007199254740993 + 0 = 9007199254740993"
      },
      "tol": 0
    },
    {
      "id": "long-bigint-huge",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": "9007199254740993123456789",
        "b": "7",
        "mode": "long"
      },
      "expect": {
        "quotient": "1286742750677284731922398",
        "remainder": 3,
        "exact": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "long",
        "integer_engine": "bigint",
        "a": "9007199254740993123456789",
        "b": 7,
        "value": null,
        "ieee_value": null,
        "quotient": "1286742750677284731922398",
        "remainder": 3,
        "decimal_places": 8,
        "precision": 8,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": null,
        "exact": false,
        "display_exact": null,
        "exact_value": "9007199254740993123456789/7",
        "work": "Long division: 9007199254740993123456789 ÷ 7\n\n      1286742750677284731922398\n  7 ) 9007199254740993123456789\n\nStep-by-step:\n  1. Take 9: 7 goes 1 time → 1 × 7 = 7; 9 − 7 = 2\n  2. Take 20: 7 goes 2 times → 2 × 7 = 14; 20 − 14 = 6\n  3. Take 60: 7 goes 8 times → 8 × 7 = 56; 60 − 56 = 4\n  4. Take 47: 7 goes 6 times → 6 × 7 = 42; 47 − 42 = 5\n  5. Take 51: 7 goes 7 times → 7 × 7 = 49; 51 − 49 = 2\n  6. Take 29: 7 goes 4 times → 4 × 7 = 28; 29 − 28 = 1\n  7. Take 19: 7 goes 2 times → 2 × 7 = 14; 19 − 14 = 5\n  8. Take 52: 7 goes 7 times → 7 × 7 = 49; 52 − 49 = 3\n  9. Take 35: 7 goes 5 times → 5 × 7 = 35; 35 − 35 = 0\n  10. Take 4: 7 goes 0 times → 0 × 7 = 0; 4 − 0 = 4\n  11. Take 47: 7 goes 6 times → 6 × 7 = 42; 47 − 42 = 5\n  12. Take 54: 7 goes 7 times → 7 × 7 = 49; 54 − 49 = 5\n  13. Take 50: 7 goes 7 times → 7 × 7 = 49; 50 − 49 = 1\n  14. Take 19: 7 goes 2 times → 2 × 7 = 14; 19 − 14 = 5\n  15. Take 59: 7 goes 8 times → 8 × 7 = 56; 59 − 56 = 3\n  16. Take 33: 7 goes 4 times → 4 × 7 = 28; 33 − 28 = 5\n  17. Take 51: 7 goes 7 times → 7 × 7 = 49; 51 − 49 = 2\n  18. Take 22: 7 goes 3 times → 3 × 7 = 21; 22 − 21 = 1\n  19. Take 13: 7 goes 1 time → 1 × 7 = 7; 13 − 7 = 6\n  20. Take 64: 7 goes 9 times → 9 × 7 = 63; 64 − 63 = 1\n  21. Take 15: 7 goes 2 times → 2 × 7 = 14; 15 − 14 = 1\n  22. Take 16: 7 goes 2 times → 2 × 7 = 14; 16 − 14 = 2\n  23. Take 27: 7 goes 3 times → 3 × 7 = 21; 27 − 21 = 6\n  24. Take 68: 7 goes 9 times → 9 × 7 = 63; 68 − 63 = 5\n  25. Take 59: 7 goes 8 times → 8 × 7 = 56; 59 − 56 = 3\n\nQuotient = 1286742750677284731922398\nRemainder = 3\nCheck: 7 × 1286742750677284731922398 + 3 = 9007199254740993123456789"
      },
      "tol": 0
    },
    {
      "id": "quotient-reject-unsafe-int",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": "9007199254740993",
        "b": "1",
        "mode": "quotient"
      },
      "expectError": "INTEGER_OUT_OF_SAFE_RANGE",
      "code": "INTEGER_OUT_OF_SAFE_RANGE",
      "error": "dividend is outside the IEEE-754 binary64 safe-integer range (±(2^53−1)). Use Long division for exact large integers."
    },
    {
      "id": "decimals-out-of-range",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 100,
        "b": 7,
        "decimals": 100,
        "mode": "quotient"
      },
      "expectError": "DECIMAL_PLACES_OUT_OF_RANGE",
      "code": "DECIMAL_PLACES_OUT_OF_RANGE",
      "error": "Decimal places must be between 0 and 16."
    },
    {
      "id": "decimals-16-ok",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 1,
        "b": 3,
        "decimals": 16,
        "mode": "quotient"
      },
      "expect": {
        "decimal_value": "0.3333333333333333",
        "precision": 16
      },
      "expectWarning": null,
      "actual": {
        "mode": "quotient",
        "a": 1,
        "b": 3,
        "value": 0.3333333333333333,
        "ieee_value": 0.3333333333333333,
        "decimal_places": 16,
        "precision": 16,
        "rounding": "IEEE-754 binary64 a/b, then Number.prototype.toFixed(n) (round half away from 0 on that binary64 value). Display may strip trailing zeros. Not decimal arbitrary-precision.",
        "decimal_value": "0.3333333333333333",
        "exact": false,
        "display_exact": true,
        "exact_value": "1/3",
        "integer_quotient": 0,
        "remainder": 1
      },
      "tol": null
    },
    {
      "id": "long-reject-neg10",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -10,
        "b": 3,
        "mode": "long"
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "Long division mode needs non-negative integers. Use Quotient mode for decimals or negatives."
    },
    {
      "id": "long-too-long",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": "1000000000000000000000000000000000000000000000000",
        "b": "1",
        "mode": "long"
      },
      "expectError": "INTEGER_TOO_LONG",
      "code": "INTEGER_TOO_LONG",
      "error": "Long division supports integers up to 48 digits."
    },
    {
      "id": "arithmetic-op-div-regression",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "op": "div",
        "a": 8,
        "b": 4
      },
      "expect": 2,
      "expectWarning": null,
      "actual": 2,
      "tol": 0,
      "engine": "arithmetic"
    },
    {
      "id": "boundary-div-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 1,
        "b": 0
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "Division by zero is undefined."
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 34,
      "total": 34,
      "golden": 25,
      "boundary": 9,
      "property": 0
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-10T22:48:17.762Z",
  "rendered_at": "2026-09-16T22:03:43.783Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.5",
    "artifacts": {
      "engine": "1.0.5",
      "page": "1.0.5",
      "capability": "1.0.5",
      "evidence": "1.0.5",
      "input_schema": "1.0.5",
      "output_schema": "1.0.5",
      "mcp_contract": "1.0.5"
    },
    "digests": {
      "input_schema_sha256": "c2fbe7133f0d6d938d97df912ce41744cab1a9b9c4c036e7d96091ea87b90b86",
      "output_schema_sha256": "cd04600caf14ef379fce2d64ad8015d48c4e2db551808873c8e534cf37d8159f",
      "evidence_sha256": "1a7421e21aaf06ae29504bcd6b9ef1bb8c8e033a5aa1bea816ff55da0b80d269",
      "evidence_core_sha256": "1a7421e21aaf06ae29504bcd6b9ef1bb8c8e033a5aa1bea816ff55da0b80d269",
      "capability_sha256": "b40c1ab868f5bd9ba35972507a35335d899370d3b7afd2bf60e5096d129b1116",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 3,
      "passed": 3,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.5"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
