feat(numeric): GF-T16 spends its last two positions, and four specs come back (Refs #2001) - #2005
Merged
Merged
Conversation
… rungs
GF-T was absent from specs/numeric/formats_catalog.t27 entirely. The only id
matching "gft" was gfternary, which is a different format -- a 2-bit
{-phi, 0, +phi} alphabet, not the ternary-EXPONENT ladder. So the ladder had spec
files for four rungs, no catalog rows, and no conformance packs, while a sibling
repo's specs/gft.tri named this directory as its own source of truth. The rows and
the five missing rungs are added here, where they belong.
The ladder follows the width rule 1 + E_t + M = N, counting one position per trit
-- the rule gft4, gft8 and gft32 already satisfy exactly. GF-T64 (7 trits, 56
bits), GF-T128 (8, 119), GF-T256 (9, 246), GF-T512 (10, 501), GF-T1024 (11, 1012)
follow it. gft16 keeps its historical M = 9 and therefore 14 of its 16 positions;
that gap is recorded rather than silently closed, because spending it invalidates
the conformance vectors and the published silicon numbers.
Two fields in the new rows need reading with care and the block comment says so.
e= counts TRITS, not bits, with the bit-equivalent E_t*log2(3) spelled out in each
row. And phi_distance, computed by the catalog's own |e/m - 1/phi| on that
equivalent, rises toward 1/phi as N grows. That is structural, not a defect: GF
sizes its exponent by e = round((N-1)/phi^2), which puts e/m at 1/phi by
construction, while GF-T sizes its exponent for range and takes M = N-1-E_t. The
two ladders optimise different axes and the field now makes that visible instead
of implying GF-T is a worse GF.
Conformance packs for all nine rungs are generated from the reference oracle. The
probes are powers of two and 1.5*2^e chosen inside each rung's own exponent range,
so every value is exactly representable in both the rung and f64 and every
abs_error is exactly zero by construction -- no allowlist entries needed. An
earlier attempt used fixed probes including 100.0, which GF-T4 cannot represent at
all (its exponent reaches 4); the integrity gate caught it as undisclosed nonzero
error, which is the gate working.
Gates: catalog count SSOT == fresh regen == 92 (the paper's declared 84 was
already stale at 83 before this change; the errata reminder now reads 92).
WP-18 conformance integrity CLEAN. t27c typechecks all nine specs.
Two of my own errors are worth recording. I first extended the derived
zig-golden-float/specs/gft.tri instead of this catalog, though that file's own
provenance field points here. And my regeneration filter matched the prefix "gft"
and dropped gfternary from the pack index; the gate caught that too, after a
baseline run on stashed changes showed it had been CLEAN before I touched it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The catalog now carries all nine GF-T rows but NUMERIC_FORMATS_SSOT.md still described only the binary GF ladder, TF3 and GFTernary. Anyone reading the document rather than the catalog would conclude the ternary-exponent ladder does not exist, and section 4 is precisely where that confusion is supposed to be prevented -- it already exists to keep TF3 and GFTernary apart. Section 4a adds the third object. GF-T is not a ternary alphabet: it is an ordinary binary-radix float whose exponent FIELD is a balanced-ternary integer. Only the encoding is ternary; the scale is a power of two. A format that scales by 3^e -- Ternary27 is the published example -- is a different design and measurably a worse one at equal width, by 0.33 positions per number, and the section gives the closed form. The table carries all nine rungs with the width rule, the range, the measured post-route figures where they exist, and an explicit "fits rule" column so GF-T16's two unallocated positions are visible rather than buried. Two columns are read wrong without help, so the section explains both. E is a count of trits; the bit-equivalent is given. And phi-distance rises toward 1/phi as N grows, which is structural: GF sizes its exponent by round((N-1)/phi^2), putting E/M at 1/phi by construction, while GF-T sizes its exponent for range. Without that note GF-T reads as a progressively worse GF, which it is not -- the two ladders optimise different axes. The section states what the fixed field buys and what it does not, because the second half is what keeps the first half honest. It buys the regime codec: 438 LUTs for a unary one, 40 for a length-prefixed one, 0 here, which through the measured area law A(M) = 141 + 2.4455 M^2 is 9.95 mantissa bits of silicon at the 16-bit class and 1.00 at M = 90. It does not buy unbounded range: by Kraft no prefix code on the integers beats l(e) = log2|e| infinitely often, so takum's regime is asymptotically optimal and nothing including GF-T beats it beyond GF-T's own range. The 2.83x and 5.46x hold inside that range and are marked as such. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…than miscounted
The 2026-06-14 erratum set the canonical count at 83 and superseded the paper's
84. That number has moved again, and for a different reason than last time.
Last time was a miscount. This time GF-T -- the ternary-exponent ladder -- had
zero rows in the catalog. The only id matching `gft` was `gfternary`, a different
object entirely: a 2-bit {-phi, 0, +phi} alphabet, not a float with a
balanced-ternary exponent field. Four rungs existed as .t27 specs with no catalog
row and no conformance pack; five more did not exist at all. A sibling
repository's specs/gft.tri named this directory as its own source of truth, so the
ladder was being maintained downstream of a catalog that had never heard of it.
Registering all nine rungs with their packs is the whole of the +9. Canonical
count going forward is 92; both 84 and 83 are superseded. The amendment carries
the cluster breakdown at 92 and states what did not change: no pack, SHA-256 or
bit-exact vector from the 83 is affected, nothing was renumbered or re-hashed.
The recommendation from June stands and this is the second time it has needed
acting on. The paper's count is a constant in the gate rather than a derived
number, which is exactly what lets the two drift; quote the live SSOT count with
the commit that produced it, not a number frozen into a title.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ome back (Refs #2001) Two things, one of them a defect I shipped in #1955. gft4/8/16/32.t27 existed only in an unpushed local commit and were never on master. #1955 added nine catalog rows pointing at them, so four source= pointers have been dangling since it merged. Recovered from ff0b8de83; all nine specs now exist where the catalog says they do, and t27c typechecks each. gft16 then spends the two positions it was carrying unallocated. It used 14 of its 16: it inherited GF16's phi-optimal M = 9 and replaced GF16's six-bit exponent with four trits, and nobody re-spent what that freed. It was the only rung derived from its parent rather than from the ladder's width rule. Spent on mantissa rather than exponent, and the reason is a measurement rather than a preference. At this class the extra range is not consumed: quantised inference tensors span roughly 2^-14 to 2^14, and E_t = 4 already clips nothing at +/-40 binades -- 0 clips in 2000 values. E_t = 6 would have bought +/-364 binades at bit-identical error, which is range nobody spends at 16 bits. Measured effect: error 3.45e-4 -> 8.63e-5, a factor of 4.00 exactly as the precision law requires, since the exponent cancels and only M moves. Against takum16 the rung goes from 0.92x / 2.88x / 5.49x to 3.70x / 11.37x / 22.28x and stops losing the near bin. Silicon 372 -> 443 LUTs, +19%, at 131.73 -> 136.44 MHz: no frequency penalty. Conformance re-run in full rather than assumed: round-trip with sign 2000/2000, encoding monotone with 0 inversions, +/- symmetry 0/500 mismatches, lower boundary decodes. The gft16 pack is regenerated at M = 11 and a width_rule test added to the spec, so the position count is now asserted rather than remembered. All nine rungs satisfy 1 + E_t + M = N. Catalog count 92, WP-18 CLEAN, t27c clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Four conflicts, all from the squash-merge of #1955: master carries the M = 9 rung this branch changes to M = 11. formats_catalog.t27 take this branch's row -- M = 11 is the PR's subject gft16_conformance_v0 take this branch's pack, regenerated at M = 11 INDEX_all_formats take master's index, recompute the gft16 entry's hash docs/NOW.md keep both entries, this branch's on top Gates after resolution: catalog count 92, WP-18 CLEAN, t27c clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
gHashTag
pushed a commit
that referenced
this pull request
Aug 9, 2026
master carries the M = 11 change from #2005 under the old gft names; this branch carries the same change under tef. Verified the conflicting hunks differ ONLY by naming before taking this side, rather than assuming it. formats_catalog this branch (TEF), sides confirmed name-identical otherwise tef16 pack this branch, already at M = 11 INDEX master's, ids remapped gft* -> tef*, hashes recomputed from the files actually on disk rather than carried over docs/NOW.md both entries kept Gates: catalog count 92, WP-18 CLEAN, t27c clean on all nine TEF specs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things, and one is a defect I shipped in #1955.
The defect first
gft4/8/16/32.t27existed only in an unpushed local commit and were never on master. #1955 added nine catalog rows pointing at them, so foursource=pointers have been dangling since it merged. Recovered fromff0b8de83; all nine specs now exist where the catalog says they do, andt27ctypechecks each.GF-T16 spends its two unallocated positions
It used 14 of its 16. It inherited GF16's φ-optimal
M = 9and replaced GF16's six-bit exponent with four trits, and nobody re-spent what that freed — the only rung derived from its parent rather than from the ladder's width rule.Spent on mantissa, not exponent, and that is a measurement rather than a preference: at this class the extra range is not consumed. Quantised-inference tensors span roughly
2^-14to2^14, andE_t = 4already clips nothing at ±40 binades — 0 clips in 2000 values.E_t = 6would have bought ±364 binades at bit-identical error, which is range nobody spends at 16 bits.The factor is 4.00 exactly, as the precision law requires — the exponent cancels and only
Mmoves. The near bin stops being a loss. The +19% area comes with no frequency penalty.Conformance re-run, not assumed
The
gft16pack is regenerated atM = 11, and awidth_ruletest is added to the spec so the position count is asserted rather than remembered.Gates
All nine rungs now satisfy
1 + E_t + M = N. Catalog count 92, WP-18 conformance integrity CLEAN,t27c checkclean.🤖 Generated with Claude Code