Home Developers CVP Evidence Reproduce

CVP reproduce

math.tan

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.4
CVP protocol
1.0.0-proposed · proposed
Evidence revision
2026-09-08.policy
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 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.

  • Last O3 run 16 / 16
  • Max error observed 1 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 tan 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.tan
REST check
POST https://www.calculatorx.com/api/v1/calc/tan 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-tan-0angle{"theta":0,"unit":"deg"}0
0.0
00PASS
o3-tan-30angle{"theta":30,"unit":"deg"}0.5773502691896257
0.5773502691896257645091487805019574556476
0.57735026918962581PASS
o3-tan-45angle{"theta":45,"unit":"deg"}1
1.000000000000000000000000000000000000000
10PASS
o3-tan-60angle{"theta":60,"unit":"deg"}1.7320508075688772
1.732050807568877293527446341505872366943
1.73205080756887720PASS
o3-tan-33.3angle{"theta":33.3,"unit":"deg"}0.6568772224012793
0.6568772224012793058993686214134783616336
0.65687722240127921PASS
o3-tan-12.5angle{"theta":12.5,"unit":"deg"}0.2216946626429399
0.2216946626429399015774175351629076072995
0.22169466264293990PASS
o3-tan--30angle{"theta":-30,"unit":"deg"}-0.5773502691896257
-0.5773502691896257645091487805019574556476
-0.57735026918962581PASS
o3-tan-15angle{"theta":15,"unit":"deg"}0.2679491924311227
0.2679491924311227064725536584941276330572
0.26794919243112270PASS
o3-tan-rand-00random-interior{"theta":-9.521018178202212,"unit":"deg"}-0.16771974138327453
-0.1677197413832745375180055677494087768826
-0.167719741383274530PASS
o3-tan-rand-01random-interior{"theta":-49.17627475224435,"unit":"deg"}-1.1575417700993667
-1.157541770099366585757296964226963485660
-1.15754177009936670PASS
o3-tan-rand-02random-interior{"theta":-15.125182247720659,"unit":"deg"}-0.27029227487610746
-0.2702922748761074788453417315550358776229
-0.270292274876107460PASS
o3-tan-rand-03random-interior{"theta":-20.3740899451077,"unit":"deg"}-0.371381992439033
-0.3713819924390330019484798354167363428041
-0.371381992439032971PASS
o3-tan-rand-04random-interior{"theta":41.5409168926999,"unit":"deg"}0.8859991849240253
0.8859991849240252437343455376912939508883
0.88599918492402521PASS
o3-tan-rand-05random-interior{"theta":18.29761858098209,"unit":"deg"}0.3306722711014023
0.3306722711014022785131506591232206820565
0.33067227110140230PASS
o3-tan-rand-06random-interior{"theta":-32.824693503789604,"unit":"deg"}-0.6450661727384714
-0.6450661727384714584971252542617801539225
-0.64506617273847140PASS
o3-tan-rand-07random-interior{"theta":0.6524018943309784,"unit":"deg"}0.011387053231385207
0.01138705323138520762201678784849229637230
0.0113870532313852061PASS