Blog
A format with phi in its name. Measured: in the two-bit digit alphabet phi is not observable at all, and a dot product of GFTernary vectors is exactly phi-squared times the same codes read as balanced ternary. The prior art put phi where it does carry information — in 2002.
A format called GoldenFloat has a golden ratio in its name. The question worth asking is not whether 1.618 is close to phi. It is whether the thing the format calls phi satisfies the property that defines phi, in the arithmetic the format actually uses.
Three arithmetics here carry a phi, and they do not agree.
| where | phi^2 = phi + 1 ? | notes |
|---|---|---|
| the oracle, exact ring Z[phi] | yes, symbolically | 14641/14641 sign decisions agree with 60-digit arithmetic; never touches a float |
| the closed 2-bit format | not measurable | see below |
| the RTL, fp32 | no, off by 1 ulp | 0x40278DDF against 0x40278DDE |
Decode two codes, operate, quantise back by sign. Substituting 1, 2, pi, 0.001 or 10^12 for phi reproduces the identical 16 addition and 16 multiplication results. At two bits the format is observationally balanced ternary.
In a dot product the same fact takes a sharper form. Every digit is phi*t with t in {-1, 0, +1}, so each product term is (phi*t)(phi*u) = phi^2*t*u, and by linearity:
<x, y> = phi^2 * <x~, y~>
where x~ and y~ are the same codes read as balanced ternary. Verified on 20000 random dot products as integer equality in Z[phi] — the accumulator is always (k, k). A first attempt measured this through a decimal phi, got 1e-47, and nearly reported it as exact. The ruler was the error, not the result.
phi^2 = 2.618034 is a constant every quantised pipeline already carries as a per-tensor scale. The fp32 constant implementing it, 0x3FCF1BBD, is the correctly-rounded phi — 0.138 ulp — and buys no representational power while costing rounding: 14 ulp on a dot product of length 4096, and phi^2 != phi + 1 in the hardware by 1 ulp.
The board pays for that in area. It computes the product of two 2-bit codes by decoding both to fp32, running a full IEEE-shaped multiplier, and thresholding the 32-bit result back down to 2 bits.
| unit | cells | wires | flops |
|---|---|---|---|
| gf_mul_param, free 32-bit inputs | 1654 | 1664 | 17 |
| the exact unit, no multiplier and no phi | 13 | 14 | 0 |
| the fp32 path with only 2-bit inputs | 14 | 63 | 2 |
Measured with Yosys 0.65. The version is part of the number: the same script on 0.33 reports different cell counts. All 16 input pairs agree between the two units, driven through the fp32 pipeline's handshake — equivalent, not merely smaller.
The third row is not a design. It is yosys reaching the same conclusion by constant propagation: given only four input codes, the multiplier folds away. That fold is luck, not architecture. The design still asks for a general multiplier to compute a function of four bits, and a tool that does not fold it pays the first row.
None of this says phi is a bad choice. It says the digit alphabet is the placement where phi cannot do any work. Put it in the positional weights and it can: Stakhov's ternary mirror-symmetrical system uses digits {-1, 0, +1} with weights phi^(2i), building on Bergman's 1957 base-phi system. There a digit's position changes its value, so phi does not factor out.
That system was reimplemented here and checked: every integer from 0 to 12 has a representation whose digit string is unchanged when read backwards. Stakhov built a self-checking adder on exactly that property — a fault breaks the symmetry, so the code detects its own errors.
Same constant, opposite outcome. The prior art chose the load-bearing placement in 2002.
The verifier behind all of this was mutation-tested, and it passed a mutation it should have failed: flipping one entry of its lookup table left every claim green, because the table sat on both sides of the identity being tested and cancelled with itself. An hour earlier, a workflow step written to catch a silently-ignored toolchain pin had read an 8-digit date out of a version string that contains no date, so its guard skipped and the step reported success without comparing anything.
Both were vacuous. Neither was caught by reading; both were caught by changing a constant and noticing nothing went red. That became a command, and pointing it back at the verifier found a third: the substitution test above compared quantiser tables only against each other, so a degenerate quantiser would have made the whole inertness claim pass vacuously. It is pinned to the decode RTL now.
A check that cannot fail is indistinguishable from one that passed.
No frequency, no board, no power. The exact unit is combinational, so its zero flip-flops are a property of the unit and not a speed claim. Nothing here compares any design against a specification. And the measurement that would decide whether this format family is worth publishing at all — the block axis against MXFP4 — has not been made.
Every figure above is measured, and the limits are named with it.