A decoder D̂: {0,1}^B → ℝ is bit-manipulation decodable (BMD) if expressible as a fixed-length straight-line program over {+,−,×,≫,≪,&,|,⊕} on machine-word integers with output reinterpreted as float via type punning. Three BMD realizations for log-uniform decoding: lookup table (O(N) storage), reinterpret cast / Quake trick (3 ops), and quadratic approximation (5 ops, 0.27% max error).
In QF8, values are stored as fixed-point logarithms. To accumulate products in linear domain (the Kulisch accumulation strategy), each log-code must be converted back to a linear value. A BMD decoder is a way to do this conversion using only cheap integer operations — no floating-point unit required.
A decoder D̂: {0,1}^B → ℝ is bit-manipulation decodable if it can be expressed as a fixed-length straight-line program over {+, −, ×, ≫, ≪, &, |, ⊕} on machine-word integers, with the output reinterpreted as a float via type punning.
The key insight is that IEEE 754 floating-point bit patterns are approximately linear in log₂(x) — the same observation behind the famous Quake III fast inverse square root hack. BMD decoders exploit this structure.
The log-uniform quantizer decode function D̂(n) = a · rⁿ admits three BMD implementations:
The class of monotone BMD decoders from B-bit integers to positive reals is conjectured to be exactly the class of functions expressible as D̂(n) = float_reinterpret(a·n + b) for integer constants a, b, or compositions of a bounded number of such reinterpretations with integer arithmetic. This remains unproven and is listed as an open question in the QF8 paper.