Home Developers CVP Evidence Reproduce

CVP reproduce

math.cos

Independent re-run pack: fixed input vectors, O3 expected values, oracle version, commands, and the last result summary. This is how a reader moves from “CalculatorX says it passed” to “I can reproduce why it passed.”

Identity

Calculation version, protocol version, and evidence revision are distinct.

Calculation version
1.0.5
CVP protocol
1.0.0-proposed · proposed
Evidence revision
2026-09-08.xcal
Oracle
O3 · mpmath 1.4.1 · 80 dps
Generator
math-mpmath-o3 · seed 20260907
Table SHA-256
efdad939a92a67df1f3995db36c52bb87f428a59fc73568f789c02540f4372ee

Numerical claim

O3 PASS is a tabulated-vector claim, not a whole-domain proof.

≤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.

  • Last O3 run 18 / 18
  • Max error observed 0 ULP
  • Threshold ≤ 2 ULP

Commands

Regenerate the table from the public generator. Independent REST check needs only this page's reproduce.json plus stdlib Python — no repo clone and no mpmath. The CVP runner remains a maintainer command.

Regenerate O3 table
python3 generate-math-o3.py after downloading the public generator next to the table
Repo maintainer path
python3 scripts/lib/cvp/oracles/generate-math-o3.py
Independent REST check
python3 check-math-o3-rest.py cos after downloading check-math-o3-rest.py next to math-o3-tables.json (or pass --reproduce reproduce.json)
Re-run CVP
npm run cvp:run -- --capability math.cos
REST check
POST https://www.calculatorx.com/api/v1/calc/cos with a tabulated input from the table below

Re-running the generator without changing seed or inputs should reproduce table SHA-256 efdad939a92a67df1f3995db36c52bb87f428a59fc73568f789c02540f4372ee. Compare each expected_f64 to the production result within the declared ULP threshold.

Tabulated vectors

Every O3 vector used for the ≤2 ULP claim. Expected values come from the published mpmath table, not from the implementation under test.

IDKindInputsExpected (f64)ActualULPStatus
o3-cos-0angle{"theta":0,"unit":"deg"}1
1.000000000000000000000000000000000000000
10PASS
o3-cos-30angle{"theta":30,"unit":"deg"}0.8660254037844386
0.8660254037844386467637231707529361834714
0.86602540378443860PASS
o3-cos-45angle{"theta":45,"unit":"deg"}0.7071067811865476
0.7071067811865475244008443621048490392848
0.70710678118654760PASS
o3-cos-60angle{"theta":60,"unit":"deg"}0.5
0.5000000000000000000000000000000000000000
0.50PASS
o3-cos-90angle{"theta":90,"unit":"deg"}0
0.0
00PASS
o3-cos-180angle{"theta":180,"unit":"deg"}-1
-1.000000000000000000000000000000000000000
-10PASS
o3-cos-33.3angle{"theta":33.3,"unit":"deg"}0.8358073613682703
0.8358073613682702857094153628941470787928
0.83580736136827030PASS
o3-cos-12.5angle{"theta":12.5,"unit":"deg"}0.9762960071199334
0.9762960071199333659708864896054275771653
0.97629600711993340PASS
o3-cos--30angle{"theta":-30,"unit":"deg"}0.8660254037844386
0.8660254037844386467637231707529361834714
0.86602540378443860PASS
o3-cos-15angle{"theta":15,"unit":"deg"}0.9659258262890683
0.9659258262890682867497431997288973676339
0.96592582628906830PASS
o3-cos-rand-00random-interior{"theta":-9.559773420915008,"unit":"deg"}0.9861128800941029
0.9861128800941028652908262453963846876746
0.98611288009410290PASS
o3-cos-rand-01random-interior{"theta":41.753348731435835,"unit":"deg"}0.7460184554083706
0.7460184554083705867088104707357776419516
0.74601845540837060PASS
o3-cos-rand-02random-interior{"theta":16.403990518301725,"unit":"deg"}0.9592943077850056
0.9592943077850055966326827207755255900343
0.95929430778500560PASS
o3-cos-rand-03random-interior{"theta":-24.075726536102593,"unit":"deg"}0.9130070852711516
0.9130070852711515531889422578244704191104
0.91300708527115160PASS
o3-cos-rand-04random-interior{"theta":-25.105708884075284,"unit":"deg"}0.9055265277845048
0.9055265277845048629611810932764418743549
0.90552652778450480PASS
o3-cos-rand-05random-interior{"theta":43.52653187233955,"unit":"deg"}0.7250555379109475
0.7250555379109474598894102059111360381079
0.72505553791094750PASS
o3-cos-rand-06random-interior{"theta":24.071603268384933,"unit":"deg"}0.9130364404111473
0.9130364404111472886583069181110995588040
0.91303644041114730PASS
o3-cos-rand-07random-interior{"theta":9.037105715833604,"unit":"deg"}0.9875868238749216
0.9875868238749215616683168383263587344341
0.98758682387492160PASS