Skip to content

conformance: promote 6 structural packs to bit-precise (IBM HFP, x87, NF4, GFTernary) (Closes #1076) - #1077

Merged
gHashTag merged 1 commit into
masterfrom
conformance/structural-to-bitexact
Jun 14, 2026
Merged

conformance: promote 6 structural packs to bit-precise (IBM HFP, x87, NF4, GFTernary) (Closes #1076)#1077
gHashTag merged 1 commit into
masterfrom
conformance/structural-to-bitexact

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Summary

Promotes 6 conformance packs from structural (placeholder, bitexact: false) to bit-precise (bitexact: true, abs_error = 0 for every recorded vector) by adding dedicated reference codecs to conformance/vectors/gen_all_formats.py. Follows #1070.

Codecs added

Format Layout Decode
ibm_hfp32/64/128 IBM HFP base-16 (S1:E7 excess-64:M) value = 0.M(2) * 16^(E-64); 3.0 = 0.1875 x 16^1
x87_fp80 Intel 80-bit ext, explicit integer bit MSB of 64-bit significand (S1:E15:SIG64), bias 16383 value = (SIG/2^63) * 2^(E-16383)
nf4 QLoRA NF4 16-entry quantile table over [-1,1] exhaustive 16-code lookup
gfternary 2-bit {-phi, 0, +phi} exhaustive 4-code enumeration

New helpers: make_ibm_hfp_decoder / ibm_hfp_encode_exact, make_x87_decoder / x87_encode_exact, make_nf4_decoder + NF4_TABLE, make_gfternary_decoder, routed in build_decodable / build_bitexact_pack.

Result

  • INDEX_all_formats.json: bitexact_packs 49 -> 55, structural_packs 34 -> 28, total_packs 83 (unchanged).
  • Every new pack independently verified to round-trip with abs_error = 0.
  • IBM HFP and x87 hit the 3.0 anchor exactly; gfternary and nf4 honestly record a null anchor (3.0 not a grid point) with a note -- no false claim.
  • double_double / quad_double stay structural (composite multi-double, no single S:E:M) -- honest, not promoted.
  • README.md index, counts, SHA-256 block (all 83 verified), and a changelog entry updated.
  • Generator re-run is byte-identical (reproducible). All packs + generator ASCII-only.
  • docs/NOW.md newest entry added.

Anchor identity: phi^2 + phi^-2 = 3.

Closes #1076

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-06-14 12:04:21 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 8
PRs with All Checks Green 4
READY 3
FAILING 8
PENDING 0

… NF4, GFTernary)

Add dedicated reference codecs to gen_all_formats.py that turn 6 honest
structural placeholders into bit-precise round-trip packs (abs_error=0):

- ibm_hfp32/64/128: IBM Hexadecimal Floating Point, base-16 exponent
  (S1:E7 excess-64:M), value = 0.M(2) * 16^(E-64); 3.0 = 0.1875 x 16^1
- x87_fp80: Intel 80-bit extended, explicit integer bit as MSB of the
  64-bit significand field (S1:E15:SIG64), bias 16383
- nf4: QLoRA/bitsandbytes NF4 16-entry quantile table over [-1,1]
- gfternary: 2-bit {-phi, 0, +phi}, exhaustive 4-code enumeration

INDEX totals: bitexact 49->55, structural 34->28, total 83 (unchanged).
README index/counts/SHA-256/changelog regenerated. double_double and
quad_double stay structural (composite multi-double, no single S:E:M).
All packs and generator ASCII-only. Anchor: phi^2 + phi^-2 = 3.

Closes #1076
@gHashTag
gHashTag force-pushed the conformance/structural-to-bitexact branch from fb2780a to fb6f5c8 Compare June 14, 2026 12:23
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-06-14 12:24:00 UTC

Summary

Status Count
Total Open PRs 10
PRs with Failing Checks 8
PRs with All Checks Green 2
READY 1
FAILING 8
PENDING 0

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit f58c298 into master Jun 14, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conformance: promote 6 structural packs to bit-precise (IBM HFP, x87, NF4, GFTernary)

1 participant