Home Developers Evidence math.divide

Public evidence

math.divide

Machine-checked verification for calculation version 1.0.5 · tier engine_tested

CVP: CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance· quotient or long integer division · Protocol · Schema · Production report

Declared partition coverage
PASS · 7/7 declared partitions (quotient-normal, quotient-rounding, quotient-boundary, long-normal, long-large-integer, long-boundary, invalid-domain)
Versions
Calculation 1.0.5 · CVP protocol 1.0.0-proposed · Evidence 2026-09-08.exact-contract
Verification revision
2026-09-08.exact-contract · 8/8 property · digest e5997fd9b998

Verification

Legacy regression suite: 34/34 calculation tests · Production surface contract 3/3

Three distinct suites: educational examples on the calculator page, this legacy regression count (34/34 golden + boundary), and the CVP verification suite below. They are not the same number. Property, metamorphic, round-trip, O3, and interface statuses/checks are recorded in the CVP Manifest . SKIP (0/0) means that suite has no published vectors.

    This calculator CURRENT · Public schema 1.0.5 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓

CVP verification suite

Protocol checks from the Evidence Manifest. Distinct from the legacy regression suite above. Verification revision 2026-09-08.exact-contract. Calculation version 1.0.5. CVP 1.0.0-proposed. 10/10 golden · 9/9 CVP boundary · 9/9 invalid · 8/8 property · 2/2 metamorphic · 2/2 round-trip · 9/9 O3 · 2/2 cross-interface · 1/1 CVP contract. digest e5997fd9b998. ≤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.

  • Golden (oracle-backed) 10 / 10
  • CVP boundary 9 / 9
  • Invalid input 9 / 9
  • Property 8 / 8
  • Metamorphic 2 / 2
  • Round-trip 2 / 2
  • O3 high-precision 9 / 9
  • Cross-interface 2 / 2
  • CVP contract 1 / 1
  • Interfaces PASS · UI (SSR) / REST / MCP
  • Interface claim ui-ssr is query-result HTML, not a live browser session.
  • Assurance Core
  • release artifacts aligned PASS
  • schema valid input executes PASS
  • engine success output validates schema PASS

Fingerprint sha256:05136052816fe802b95ce1f369c0341dfe5f63760c652c650da94052ac1624f2

Input schema sha256:c2fbe7133f0d6d938d97df912ce41744cab1a9b9c4c036e7d96091ea87b90b86 · Output schema sha256:cd04600caf14ef379fce2d64ad8015d48c4e2db551808873c8e534cf37d8159f · Build-time SHA-256 digests prove published artifacts agree with each other (release_integrity.scope=workspace). Production attestation GETs canonical URLs twice (public/cached view and origin), including Capability HTML, via npm run attest:production --write (published at /.well-known/calculatorx-production-attestation.json) and fails if the public Capability page advertises a different calculation_version. This is artifact consistency, not an independent immutable release log.

Build & scope

Engine identity and declared limitations.

Tool
division
Engine
divide
Engine build
2026-09-10
Evidence core
2026-09-10T22:48:17.762Z
Rendered
2026-09-16T22:03:43.783Z
Last reviewed

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

Sources

Standards and references supporting this tool specification. Methods are listed separately — they are algorithms, not bibliographic sources.

Legacy published checks

Golden and boundary cases from the legacy Evidence JSON. CVP property, metamorphic, round-trip, O3, and interface statuses/checks are recorded in the Manifest — including SKIP when a suite has no vectors.

IDKindStatusDetail
exact-intgoldenpassExpected decimal_value=2 · exact=true · ieee_value=2 · Actual value=2 · mode=quotient · a=8 · b=4 · 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-100-div-7goldenpassExpected decimal_value=14.28571429 · exact=false · precision=8 · Actual value=14.285714285714286 · mode=quotient · a=100 · b=7 · 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-ieeegoldenpassExpected 14.285714285714285 · Actual value=14.285714285714286 · mode=quotient · a=100 · b=7 · 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.
one-thirdgoldenpassExpected decimal_value=0.33333333 · exact=false · Actual value=0.3333333333333333 · mode=quotient · a=1 · b=3 · 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.
two-thirdsgoldenpassExpected decimal_value=0.66666667 · exact=false · Actual value=0.6666666666666666 · mode=quotient · a=2 · b=3 · 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.
zero-dividendgoldenpassExpected decimal_value=0 · ieee_value=0 · exact=true · Actual value=0 · mode=quotient · a=0 · b=7 · 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.
div-onegoldenpassExpected decimal_value=7 · ieee_value=7 · Actual value=7 · mode=quotient · a=7 · b=1 · 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.
div-selfgoldenpassExpected decimal_value=1 · ieee_value=1 · Actual value=1 · mode=quotient · a=7 · b=7 · 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.
neg-dividendgoldenpassExpected decimal_value=-14.28571429 · exact=false · Actual value=-14.285714285714286 · mode=quotient · a=-100 · b=7 · 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.
neg-divisorgoldenpassExpected decimal_value=-14.28571429 · exact=false · Actual value=-14.285714285714286 · mode=quotient · a=100 · b=-7 · 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.
neg-bothgoldenpassExpected decimal_value=14.28571429 · exact=false · Actual value=14.285714285714286 · mode=quotient · a=-100 · b=-7 · 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.
decimals-quotgoldenpassExpected decimal_value=3 · ieee_value=3 · exact=true · Actual value=3 · mode=quotient · a=1.5 · b=0.5 · 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.
decimals-zerogoldenpassExpected decimal_value=14 · precision=0 · exact=false · Actual value=14.285714285714286 · mode=quotient · a=100 · b=7 · 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.
max-safe-not-math-exactgoldenpassExpected ieee_value=1286742750677284.5 · exact=false · display_exact=true · Actual value=1286742750677284.5 · mode=quotient · a=9007199254740991 · b=7 · 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.
binary64-tofixed-artifactgoldenpassExpected decimal_value=1 · Actual value=1.005 · mode=quotient · a=1.005 · b=1 · 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.
div-zeroboundarypassExpected DIVISION_BY_ZERO · Actual DIVISION_BY_ZERO
long-100-7goldenpassExpected quotient=14 · remainder=2 · exact=false · Actual value=14.285714285714286 · mode=long · integer_engine=bigint · a=100 · b=7 · ieee_value=14.285714285714286 · quotient=14 · remainder=2
long-487-32goldenpassExpected quotient=15 · remainder=7 · Actual value=15.21875 · mode=long · integer_engine=bigint · a=487 · b=32 · ieee_value=15.21875 · quotient=15 · remainder=7
long-zerogoldenpassExpected quotient=0 · remainder=0 · exact=true · Actual value=0 · mode=long · integer_engine=bigint · a=0 · b=7 · ieee_value=0 · quotient=0 · remainder=0
long-a-lt-bgoldenpassExpected quotient=0 · remainder=3 · Actual value=0.42857142857142855 · mode=long · integer_engine=bigint · a=3 · b=7 · ieee_value=0.42857142857142855 · quotient=0 · remainder=3
long-equalgoldenpassExpected quotient=1 · remainder=0 · exact=true · Actual value=1 · mode=long · integer_engine=bigint · a=7 · b=7 · ieee_value=1 · quotient=1 · remainder=0
long-dividesgoldenpassExpected quotient=2 · remainder=0 · exact=true · Actual value=2 · mode=long · integer_engine=bigint · a=8 · b=4 · ieee_value=2 · quotient=2 · remainder=0
long-reject-decimalboundarypassExpected INVALID_INPUT · Actual INVALID_INPUT
long-reject-negativeboundarypassExpected INVALID_INPUT · Actual INVALID_INPUT
long-div-zeroboundarypassExpected DIVISION_BY_ZERO · Actual DIVISION_BY_ZERO
long-bigint-past-safegoldenpassExpected quotient=9007199254740993 · remainder=0 · exact=true · integer_engine=bigint · Actual mode=long · integer_engine=bigint · a=9007199254740993 · b=1 · quotient=9007199254740993 · remainder=0 · decimal_places=8 · precision=8
long-bigint-hugegoldenpassExpected quotient=1286742750677284731922398 · remainder=3 · exact=false · Actual mode=long · integer_engine=bigint · a=9007199254740993123456789 · b=7 · quotient=1286742750677284731922398 · remainder=3 · decimal_places=8 · precision=8
quotient-reject-unsafe-intboundarypassExpected INTEGER_OUT_OF_SAFE_RANGE · Actual INTEGER_OUT_OF_SAFE_RANGE
decimals-out-of-rangeboundarypassExpected DECIMAL_PLACES_OUT_OF_RANGE · Actual DECIMAL_PLACES_OUT_OF_RANGE
decimals-16-okgoldenpassExpected decimal_value=0.3333333333333333 · precision=16 · Actual value=0.3333333333333333 · mode=quotient · a=1 · b=3 · 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.
long-reject-neg10boundarypassExpected INVALID_INPUT · Actual INVALID_INPUT
long-too-longboundarypassExpected INTEGER_TOO_LONG · Actual INTEGER_TOO_LONG
arithmetic-op-div-regressiongoldenpassExpected 2 · Actual 2
boundary-div-zeroboundarypassExpected DIVISION_BY_ZERO · Actual DIVISION_BY_ZERO