GF14: четырнадцать битов
Вы узнаете
Как 14 битов делятся на 1 + 5 + 8, отношение в 0.007 от 1 / phi.
В GF14 14 битов: 1 знак, 5 порядка, 8 мантиссы, смещение 15. Его отношение E / M равно 0.625, всего в 0.007 от 1 / phi, потому что 5 и 8 — соседние числа Фибоначчи, а отношение соседей приближается к 1 / phi.
Попробуйте
Найдите PHI_DIST в gf14.t27 и сравните с GF10. Затем назовите следующую пару чисел Фибоначчи после 5 и 8.

GF14: 14 bits as the spec lays them out, read from gf14.t27. Lesson 12 of the GoldenFloat course.
specs/numeric/gf14.t27
// SPDX-License-Identifier: Apache-2.0
; gf14.t27 -- GoldenFloat14 Encode/Decode
; GF14: 14-bit floating point with 1 sign + 5 exponent + 8 mantissa
; Bit layout: [S(1) E(5) M(8)] = [13:13][12:8][7:0]
; phi^2 + 1/phi^2 = 3 | TRINITY
; Generated by the closed-form rule e = round((N-1)/phi^2), m = N-1-e.
; STATUS: Conj (closed-form rule, no RTL yet on this repo).
module triformat-gf14;
// ============================================================================
// Constants -- derived from the closed-form rule
// ============================================================================
pub const TOTAL_BITS : u16 = 14;
pub const SIGN_BITS : u8 = 1;
pub const EXP_BITS : u8 = 5;
pub const MANT_BITS : u16 = 8;
pub const SIGN_SHIFT : u16 = 13;
pub const EXP_SHIFT : u16 = 8;
pub const MANT_SHIFT : u16 = 0;
pub const BIAS : u64 = 15; // 2^(E-1) - 1
pub const EXP_MAX : u64 = 31; // 2^E - 1
// E/M ratio (target: 1/phi ~ 0.6180339887)
pub const EM_RATIO : f64 = 0.625000000000;
pub const PHI_DIST : f64 = 0.006966011250;
pub const PHI_BIAS_STATUS : str = "OPEN -- not derivable from closed form; empirical per format";
// PHI_BIAS for this rung is NOT defined. The published formula
// PHI_BIAS = EXP_MAX - BIAS reproduces GF64 only and is RETRACTED as a general law.
// Do NOT invent a value via Fibonacci/Lucas/square coincidence; those are
// descriptive, not prescriptive.
// ============================================================================
// Invariants -- the Fpath below, made executable (W601)
//
// This file declared its own falsification path in a comment and nothing
// checked it. W600's per-test measurement found 38 specs that compile while
// asserting nothing; this is one, and the rule it is derived from is stated
// precisely enough to be a test.
// ============================================================================
invariant gf14_field_widths_partition_the_word {
@compileAssert(SIGN_BITS + EXP_BITS + MANT_BITS == TOTAL_BITS);
}
invariant gf14_closed_form_mantissa {
// m = N - 1 - e, the second half of the generating rule
@compileAssert(MANT_BITS == TOTAL_BITS - 1 - EXP_BITS);
}
invariant gf14_closed_form_exponent {
// e = round((N-1)/phi^2) <=> (e - 1/2)*phi^2 <= N-1 <= (e + 1/2)*phi^2
// Stated as bounds because the rule rounds; phi^2 = 2.618033988749895.
@compileAssert((EXP_BITS as f64 - 0.5) * 2.618033988749895 <= TOTAL_BITS as f64 - 1.0);
@compileAssert(TOTAL_BITS as f64 - 1.0 <= (EXP_BITS as f64 + 0.5) * 2.618033988749895);
}
invariant gf14_shifts_follow_the_layout {
@compileAssert(SIGN_SHIFT == TOTAL_BITS - 1);
@compileAssert(EXP_SHIFT == MANT_BITS);
@compileAssert(MANT_SHIFT == 0);
}
invariant gf14_bias_identity {
// BIAS = 2^(E-1) - 1, as the declaration's own comment states
@compileAssert(BIAS == (1 << (EXP_BITS - 1)) - 1);
}
invariant gf14_exp_max_identity {
// EXP_MAX = 2^E - 1
@compileAssert(EXP_MAX == (1 << EXP_BITS) - 1);
}
; ============================================================================
; Claim-status: Conj
; Fpath: closed-form rule mis-applied (verify e = round((14-1)/phi^2) = 5, m = 8)
; or RTL emission diverges from this constant set.
; As of W601 the Fpath above is CHECKED by the invariants in this file.
; ============================================================================
Все уроки
Модуль 1 · Правило и его числа
Одно правило делит каждую ширину, отношение, к которому оно стремится, и числа Люка за тройкой 3.
Модуль 2 · Почему phi, почему три
Почему деление идёт по phi, почему основание три и как спека проверяет, что GF16 хранит phi.
Модуль 3 · Малые ступени: от GF4 до GF8
GF4, GF6 и GF8 — меньше всего битов, и округление до целых битов стоит здесь дороже всего.
Модуль 4 · От десяти до четырнадцати битов
GF10, GF12 и GF14 и то, как расстояние до 1 / phi меняется с ростом слова.
Модуль 5 · GF16 в работе
Основной 16-битный формат, скалярное произведение из двух слагаемых в GF-T16, затем GF20 и GF24.
Модуль 6 · От GF32 до GF64
GF32 рядом с IEEE single, GF48 без пары в IEEE, GF64 рядом с IEEE double.
Модуль 7 · От GF96 до GF256
GF96, GF128 и GF256, где спеки держат раскладку инвариантами.
Модуль 8 · Самые широкие ступени, затем триты
GF512 и GF1024, две самые широкие ступени, затем GF-T8, где порядок уходит в триты.
Модуль 9 · Ещё триты, затем декодирование
GF-T16 и GF-T32, затем почему фиксированные поля декодируются параллельно, а posit — нет.