Skip to content

Commit 4e82991

Browse files
author
Vasilev
committed
conformance: promote 6 structural formats to bit-precise (55->61/83)
Add dedicated, independently-verified reference codecs to gen_all_formats.py and regenerate packs + INDEX for: - gf10 GoldenFloat phi-aligned radix-2 S1E3M6, bias 3 (rule e=round(9/phi^2)=3, bridge GF8-GF12); decode reuses the proven GF radix-2 law; 3.0 exact at code 0x120. - decimal32/64/128 IEEE 754-2008 BID (Binary Integer Decimal): significand is a plain binary integer (combination-head implied bits + trailing field), value = coeff * 10^(exp-bias). Cross-checked vs an exact-rational (fractions.Fraction) oracle; 3.0 f64-exact. - double_double / quad_double Bailey/Hida multi-double: value = exact sum of 2/4 IEEE-754 binary64 limbs (MS-first). Fixed 128/256-bit layout, unambiguous decode law (analogous to the earlier x87_fp80 explicit-integer-bit promotion). Every promoted pack: explicit decoder + reference encoder, abs_error=0 for all recorded vectors (decode side), anchor 3.0 ieee754_exact=true. INDEX_all_formats.json: bitexact_packs 55->61, structural_packs 22->16, selfconsistent_packs 6 (unchanged). README updated: 3-tier coverage table, self-consistent index section split out, structural table reduced to the 16 genuinely-undefined-layout formats, SHA-256 manifest regenerated, changelog entry 2026-06-28. Remaining structural (16, honest): takum8/16/32/64 (tapered logarithmic, needs dedicated decoder), afp + per_channel_scale (external scale tensor), gf256 (open bias R&D parameter), and 9 zero-width parametric entries (minifloat, q_format, bcd, block_fp, shared_exp, stochastic_rounding, tapered_fp, unum_i, unum_ii). Refs: gHashTag/trinity-fpga#206. Deterministic: re-running gen_all_formats.py reproduces the exact 9-file delta.
1 parent d386fa7 commit 4e82991

9 files changed

Lines changed: 839 additions & 99 deletions

conformance/vectors/INDEX_all_formats.json

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"preprint": "https://arxiv.org/abs/2606.05017",
66
"total_formats": 83,
77
"total_packs": 83,
8-
"bitexact_packs": 55,
9-
"structural_packs": 22,
8+
"bitexact_packs": 61,
9+
"selfconsistent_packs": 6,
10+
"structural_packs": 16,
1011
"packs": [
1112
{
1213
"id": "binary16",
@@ -51,26 +52,26 @@
5152
{
5253
"id": "decimal32",
5354
"file": "decimal32_conformance_v0.json",
54-
"kind": "structural",
55-
"n_vectors": 0,
55+
"kind": "bitexact",
56+
"n_vectors": 7,
5657
"source": "generated by gen_all_formats.py",
57-
"sha256": "cd43863397f911142eed1e8e5f2a8ef41ba97d344aa6b64f8f550b5b390bbcad"
58+
"sha256": "e13bc9cd6bc33545ab55f575e23d2343418ded5eddf1395b61f31321dc7d272e"
5859
},
5960
{
6061
"id": "decimal64",
6162
"file": "decimal64_conformance_v0.json",
62-
"kind": "structural",
63-
"n_vectors": 0,
63+
"kind": "bitexact",
64+
"n_vectors": 7,
6465
"source": "generated by gen_all_formats.py",
65-
"sha256": "c42aabb5cf847a521698d9451f490ceb17c29ff1169e9c1147609ae737635a5b"
66+
"sha256": "fedef68cfe1b910e737574bbe331dc19fbe1724edbd35ec8beac89b1595bea0d"
6667
},
6768
{
6869
"id": "decimal128",
6970
"file": "decimal128_conformance_v0.json",
70-
"kind": "structural",
71-
"n_vectors": 0,
71+
"kind": "bitexact",
72+
"n_vectors": 8,
7273
"source": "generated by gen_all_formats.py",
73-
"sha256": "0e3ab9f3bd6bc3525457c9cbbab1d99ecc801a5019dd92cc87f2c5468b0d471a"
74+
"sha256": "84dbc594340717415385b3bd86eb20432f5430aba047557579f2e2a96de0dc2d"
7475
},
7576
{
7677
"id": "x87_fp80",
@@ -83,18 +84,18 @@
8384
{
8485
"id": "double_double",
8586
"file": "double_double_conformance_v0.json",
86-
"kind": "structural",
87-
"n_vectors": 0,
87+
"kind": "bitexact",
88+
"n_vectors": 8,
8889
"source": "generated by gen_all_formats.py",
89-
"sha256": "6bc6d15ba3258a125c591dedc63b4125b7ecc0d502bc1c3a2ecf65a76714c526"
90+
"sha256": "f8dc9608093afada65df94852a9b78c3a4a5466415389c5ec359afd19d3b208c"
9091
},
9192
{
9293
"id": "quad_double",
9394
"file": "quad_double_conformance_v0.json",
94-
"kind": "structural",
95-
"n_vectors": 0,
95+
"kind": "bitexact",
96+
"n_vectors": 8,
9697
"source": "generated by gen_all_formats.py",
97-
"sha256": "d0d7b15d7d8d6c590437a1e9f2d215d63115448f4eb26fe479cc5999f7b21c03"
98+
"sha256": "62ef8067fd1d70ef0abac77d4b0252a3686b9cd698ee4806e0bc1e01bcfe7cfa"
9899
},
99100
{
100101
"id": "bfloat16",
@@ -366,40 +367,36 @@
366367
{
367368
"id": "gf10",
368369
"file": "gf10_conformance_v0.json",
369-
"kind": "structural",
370-
"n_vectors": 0,
370+
"kind": "bitexact",
371+
"n_vectors": 8,
371372
"source": "generated by gen_all_formats.py",
372-
"sha256": "e7043494280dd9716f7e47ed2ef1b149872823514a9267cca5190599fc6b2102"
373+
"sha256": "af62499491faf340d7940b0b10ab0208745e57faa97bbe19588fe1d879db485b"
373374
},
374375
{
375376
"id": "gf14",
376377
"file": "gf14_conformance_v0.json",
377378
"kind": "bitexact_selfconsistent",
378-
"n_vectors": 14,
379379
"source": "wide-rung GoldenFloat oracle (single decode law, dyadic-exact, no independent second witness)",
380380
"sha256": "e4e25a0cd32c4539e152569304b1ae6204b63de65fa4fa3d824b3d74d6d875c8"
381381
},
382382
{
383383
"id": "gf48",
384384
"file": "gf48_conformance_v0.json",
385385
"kind": "bitexact_selfconsistent",
386-
"n_vectors": 15,
387386
"source": "wide-rung GoldenFloat oracle (single decode law, dyadic-exact, no independent second witness)",
388387
"sha256": "bf88f55076175dffe1fa108e0e6a526829e274f049c839e26a002a6ea6dd534e"
389388
},
390389
{
391390
"id": "gf96",
392391
"file": "gf96_conformance_v0.json",
393392
"kind": "bitexact_selfconsistent",
394-
"n_vectors": 15,
395393
"source": "wide-rung GoldenFloat oracle (single decode law, dyadic-exact, no independent second witness)",
396394
"sha256": "2566ac9f2b9fb1950e4c52e09715c148f6d29d681aa37c70f0a7e6c0457a3dba"
397395
},
398396
{
399397
"id": "gf128",
400398
"file": "gf128_conformance_v0.json",
401399
"kind": "bitexact_selfconsistent",
402-
"n_vectors": 15,
403400
"source": "wide-rung GoldenFloat oracle (single decode law, dyadic-exact, no independent second witness)",
404401
"sha256": "23a82862b0302585031b46ca75928c793f30297351ca84f806ee6497bc659264"
405402
},
@@ -415,15 +412,13 @@
415412
"id": "gf512",
416413
"file": "gf512_conformance_v0.json",
417414
"kind": "bitexact_selfconsistent",
418-
"n_vectors": 15,
419415
"source": "wide-rung GoldenFloat oracle (single decode law, dyadic-exact, no independent second witness)",
420416
"sha256": "87bd4d7cbf7fc0d653b7c3b5e5399154c7cb746a0fe668a983f767ad69b15b07"
421417
},
422418
{
423419
"id": "gf1024",
424420
"file": "gf1024_conformance_v0.json",
425421
"kind": "bitexact_selfconsistent",
426-
"n_vectors": 15,
427422
"source": "wide-rung GoldenFloat oracle (single decode law, dyadic-exact, no independent second witness)",
428423
"sha256": "6ef1c5cbe76828bf0e587fa5c0bb0f40989a7d1056cb54ad45eed192e98b4f4e"
429424
},
@@ -667,6 +662,5 @@
667662
"source": "generated by gen_all_formats.py",
668663
"sha256": "fc2a0a6dcce7bbb0eccc1e23ebdacb9abbd81cd54111796be6dc7e6a87a2071a"
669664
}
670-
],
671-
"selfconsistent_packs": 6
672-
}
665+
]
666+
}

0 commit comments

Comments
 (0)