t27c on tnf17.t27 -- a 17-bit ternary-exponent float, native
t27c on the t27c lab (Railway), spec at t27 5ff0ec512: 34 tests pass natively; negating with OR instead of XOR fails exactly one test, the involution; git restores the spec.
t27c on tnf17.t27 -- a 17-bit ternary-exponent float, native
return (x ^ (1 << TNF_SIGN_SHIFT));
}
t27 $ t27c test-report specs/numeric/tnf17.t27 --specs-dir specs | sed -n '1,7p;$p'
--- test report: specs/numeric/tnf17.t27 ---
tests 34
pass 34
FAIL 0
invariants 10 proved -- comptime, so compiling IS the check
rate 100.0%
vacuous passes 0 of 34 (passed with 0 runtime asserts executed)
t27 $ t27c gen specs/numeric/tnf17.t27 > tnf17.zig && zig test tnf17.zig
All 34 tests passed.
t27 $ sed -i 's/return (x ^ (1 << TNF_SIGN_SHIFT));/return (x | (1 << TNF_SIGN_SHIFT));/' specs/numeric/
tnf17.t27 && git diff -U0 | tail -n 2
- return (x ^ (1 << TNF_SIGN_SHIFT));
+ return (x | (1 << TNF_SIGN_SHIFT));
t27 $ t27c test-report specs/numeric/tnf17.t27 --specs-dir specs | sed -n 1,8p
--- test report: specs/numeric/tnf17.t27 ---
FAIL negate_is_an_involution
tests 34
pass 33
FAIL 1
invariants 10 proved -- comptime, so compiling IS the check
rate 97.1%
t27 $ git checkout specs/numeric/tnf17.t27 && sha256sum specs/numeric/tnf17.t27
Updated 1 path from the index
1767f5d6d0c074a6c08af54111fac6fab458f8c3c18de07b88cb741e6f977505 specs/numeric/tnf17.t27
t27 $
recorded 2026-10-07 06:13 UTC real 30.3 s shown 30.3 s exit codes 0 0 0 0 0 0 0
$ git log -1 --format='%h %s' | cut -c1-100
$ sed -n 88,90p specs/numeric/tnf17.t27
$ t27c test-report specs/numeric/tnf17.t27 --specs-dir specs | sed -n '1,7p;$p'
$ t27c gen specs/numeric/tnf17.t27 > tnf17.zig && zig test tnf17.zig
$ sed -i 's/return (x ^ (1 << TNF_SIGN_SHIFT));/return (x | (1 << TNF_SIGN_SHIFT));/' specs/numeric/tnf17.t27 && git diff -U0 | tail -n 2
$ t27c test-report specs/numeric/tnf17.t27 --specs-dir specs | sed -n 1,8p
$ git checkout specs/numeric/tnf17.t27 && sha256sum specs/numeric/tnf17.t27
Staged: the prompt and the typing. Real: every byte the commands printed, at the time they printed it. Any silence longer than 2 s is shown for 2 s, and the title bar says so while it happens. Edited: home directory shown as ~.