---
title: Floating-Floating-Point (F2P)
url: https://www.emergentmind.com/topics/floating-floating-point-f2p
type: topic
---

# Floating-Floating-Point (F2P)

Floating-Floating-Point (F2P) is a variable-precision floating-point number representation introduced to optimize the trade-off between dynamic range and numerical accuracy in narrow bit-width formats, such as 8-bit words, frequently used in resource-constrained contexts like federated learning, natural language processing, and high-speed network measurement. F2P achieves this flexibility by allowing the partitioning between exponent and mantissa to be dynamically determined on a per-value basis via a compact “hyper-exponent” field, enabling large counting ranges along with selective local precision enhancement over critical value intervals [2410.03692].

## 1. Formal Specification and Bit-Level Construction

Floating-Floating-Point numbers utilize a flexible partitioning strategy where the total bit-width $B$ is statically defined, and the division between exponent and mantissa is determined dynamically at encode time. Each F2P word consists of the following:

- **s**: Sign bit (optional, present in signed mode)
- **h**: Hyper-exponent field (H bits, unsigned integer)
- **e**: Exponent field (length $V(h)$ bits, where $V(h)$ denotes the decoded integer value of $h$)
- **m**: Mantissa field (occupies the remaining $M = B - 1 - H - V(h)$ bits)

The hyper-exponent $h$ encodes $V(h) = \sum_{i=0}^{H-1} (2^i) h_i$, which directly determines the width of the exponent field $e$. The exponent’s value is $E_2(e) = \sum_{i=0}^{V(h)-1} e_i 2^i$, and the mantissa fraction is $M_2(m) = \sum_{i=1}^M m_{-i} 2^{-i}$. The decoded real value $x$ is given by:
$$
x =
\begin{cases}
2^{E_2(e) + B_{\text{ias}}} \bigl( 1 + M_2(m) \bigr) & E_2(e) > 0 \\
2^{E_2(e) + B_{\text{ias}} + 1} M_2(m) & E_2(e) = 0
\end{cases}
$$
where $B_{\text{ias}}$ is a format-dependent bias analogous to IEEE-754 [2410.03692].

## 2. Dynamic Partitioning Algorithm

The F2P encoding process operates as follows:
1. **Exponent/Mantissa Derivation**: Normalize the input real $x$ to the nearest floating-point representation, identifying the candidate exponent $E_t$ and mantissa $M_t$.
2. **Hyper-exponent Determination**: Select the smallest hyper-exponent $h$ such that $V(h) \geq$ the bit-length of $E_t$.
3. **Packing**: Encode $h$, then the lower $V(h)$ bits of $E_t$ into $e$, and finally the leading $M$ bits of the normalized mantissa fraction into $m$.

Decoding in hardware requires first extracting $h$ to determine $V(h)$, then partitioning the remaining bits accordingly to recover $e$ and $m$, and reconstruct $x$ via the value formula. The dynamic bit-wiring is accomplished with modest logic resources—a small $2^H$-entry lookup for $h \mapsto V(h)$ and select/mux structures for shifting bits between exponent and mantissa fields. The partitioning thresholds in the value domain occur precisely where $h$ increments, typically aligning to powers of two [2410.03692].

## 3. Representable Range and Precision Properties

F2P’s flexible partitioning yields representational properties determined by $H$ and the overall bit-width $B$:
- **Range**: The minimum exponent $E_{\min}= 0$, and maximum $E_{\max} = 2^{2^H} - 1$ (with $h$ and $e$ at maximal values).
- **F2P Value Range**:
  - $x_{\max} \approx 2^{E_{\max} + B_{\text{ias}}} (2 - 2^{-M})$
  - $x_{\min} = 2^{B_{\text{ias}} + 1 - M}$
- **Error Analysis**:
  - Within any exponent bin $E$, the spacing is $\Delta = 2^{E+B_{\text{ias}}-M}$, so
    $|x - \hat x| \leq 2^{E+B_{\text{ias}}-M-1}$.
  - F2P admits local adjustment of mantissa width $M$ and thus can selectively minimize quantization error in application-critical subranges. This behavior contrasts with fixed-field IEEE-754 variants (e.g., FP8/16), wherein $\Delta$ is globally determined by static mantissa and exponent widths.

This dynamic range and accuracy distribution—tunable through “flavor” selection (e.g., Short-Range, Long-Range, Short-Integer, Long-Integer)—allows significant mean-squared-error (MSE) improvements for workloads targeting specific value domains [2410.03692].

## 4. Hardware Realization

F2P overlays existing floating-point datapaths for common operations (normalization, rounding, basic arithmetic). The only additional hardware is confined to:
- Hyper-exponent decoding (small combinational logic or lookup)
- Multiplexers to shift bits dynamically between exponent and mantissa
- Biasing logic conditioned on the chosen F2P flavor

No full post-layout timing, power, or gate-count analysis is provided for F2P in 8-bit deployments. However, as major arithmetic units (adders, multipliers) are re-used unmodified, only small increases in area and latency are anticipated, primarily due to packing/unpacking overhead. Full hardware implementation and physical design space characterization remain open areas for future investigation [2410.03692].

## 5. Empirical Evaluation Across Applications

F2P’s merits are quantitatively established by application-centric benchmarks:
- **Approximate Counters**: In per-flow packet counting (on-arrival increments), F2P_LI achieves the lowest MSE at 8–16 bits versus schemes such as Morris, CEDAR, SEAD. Example: at 8 bits, F2P_LI is $1.00\times$ MSE (best), CEDAR $1.71\times$, Morris $1.80\times$, SEAD $124.6\times$ (relative MSE per bit-width) [2410.03692].
- **Neural Network Quantization**: For 8-, 16-, and 19-bit quantization of pretrained ResNet18/50 and MobileNetV2/V3, F2P_SR and F2P_LR formats yield up to $\sim 2\times$ reduction in quantization MSE versus conventional FP8/16, BF16, TF32 formats at 16/19 bits. At 8 bits, the overhead of the hyper-exponent field can outweigh the precision benefit, leading to slightly inferior performance compared with optimal fixed FP8 encodings in most models [2410.03692].

These results illustrate F2P’s proficiency in domains requiring either very wide dynamic range, locally concentrated precision, or both.

## 6. Advantages, Limitations, and Future Outlook

**Advantages**:
- Fine-grained precision control within user-relevant subranges (via four main flavors: SR, LR, SI, LI)
- Retention of classic floating-point arithmetic semantics enables drop-in compatibility with existing FP logic
- Empirically validated MSE reduction for both approximate large integer counters and mid-precision DNN weight quantization

**Limitations**:
- Hyper-exponent field consumes $H$ bits, diminishing the effective bit budget for mantissa and exponent, which may degrade overall utility in ultra-narrow encodings (e.g., 8 bits)
- Absence of published ASIC/FPGA PPA (performance, power, area) data to support hardware cost claims
- Quantization performance is primarily measured under static min–max scaling; dynamic or mixed-precision deployments may require supplementary control logic [2410.03692]

A plausible implication is that automated toolchains for F2P encoding, as well as dynamic flavor selection and integration into mixed-precision training pipelines, are likely priorities for future research and adoption.

## 7. Relationship to Prior Art and Research Directions

F2P stands distinct from conventional IEEE-754 floating-point factorization methods, which rely on fixed radix and rigid exponent/mantissa partitioning [2106.05631]. It also diverges from mixed-radix conversion hardware (e.g., IEEE754-2008 binary-to-decimal/decimal-to-binary) where precision is tuned by changing the radix but not by adapting the intra-word field widths [1312.0455]. By introducing in-word dynamic structural variation, F2P broadens the design landscape for number representations in compact hardware and software environments, suggesting additional research in:
- Full-system hardware synthesis and PPA characterization
- Adaptive/mixed-precision flows for deep learning accelerators
- Compiler and tooling support for workload-aware flavor selection and automated bit allocation

Empirical demonstrations of up to $2\times$ MSE reductions over state-of-the-art for relevant network and ML tasks substantiate F2P’s technical significance and motivate continued exploration in narrow-word, accuracy-flexible arithmetic [2410.03692].

Source: https://www.emergentmind.com/topics/floating-floating-point-f2p