Papers
Topics
Authors
Recent
2000 character limit reached

Logarithmic Posit Arithmetic

Updated 11 November 2025
  • Logarithmic Posit is a number system that integrates tapered posit precision with log-domain encoding to offer efficient, dynamically tuned arithmetic.
  • LP formats enable per-layer parameterization that optimizes quantization in DNNs, achieving high accuracy with minimal precision loss.
  • Hardware implementations like PLAM and Takum reduce area, power, and delay compared to traditional IEEE floating-point and exact posit multipliers.

Logarithmic Posit (LP) refers collectively to arithmetic systems and number encodings that integrate the nonlinear, regime-based dynamic range of the posit number system with a logarithmic (log-domain) encoding or arithmetic structure. These constructions aim to combine the tapered precision and adaptability of posits with the hardware efficiency and numerical error properties of logarithmic computation. Applications extend across high-efficiency deep neural network (DNN) accelerators, low-precision quantization, and emerging general-purpose computer arithmetic.

1. Logarithmic-Posit Number Systems: Definition and Encoding

The canonical Logarithmic-Posit (LP) format is parameterized by four data-dependent fields:

  • Total word length nn
  • Exponent field width eses
  • Maximum regime run-length rsrs
  • Continuous scale-factor sfsf

An nn-bit LP word contains a sign bit, a run-length–encoded regime (up to rsrs bits), an eses-bit exponent, and a variable-width fraction. The regime encodes an integer kk via a run of identical bits (either 1s or 0s), terminated by the opposite bit, such that:

  • k=m1k = m - 1 if run is of 1's;
  • k=mk = -m if run is of 0's, where mm is the run-length (capped at rsrs).

The remaining bits encode ulfxulfx, a compact, fixed-point representation of log2(1.f)\log_2(1.f) (fractional significand in log-domain). The decoding formula is:

xn,es,rs,sf=(1)s×22esksf×2ulfxx_{\langle n,es,rs,sf\rangle} = (-1)^s \times 2^{2^{es}k - sf} \times 2^{ulfx}

with ulfx=E+fulfx = E + f', EE the integer exponent and ff' the log-fraction. Reconstruction is the inverse process: summing 2esksf+ulfx2^{es}k-sf+ulfx, then splitting back to (k,E,f)(k, E, f) and repacking the posit fields.

LP formats generalize the classic posit (eses, nn) system by allowing per-layer adaptation of (es,rs,sf)(es, rs, sf), thus better matching the statistics of DNN layers or application domains (Ramachandran et al., 2024).

2. Logarithmic-Approximate Arithmetic: PLAM and Takum Variants

The PLAM (Posit Logarithm-Approximate Multiplier) is a hardware-oriented logarithmic posit multiplier that replaces classic fractional multiplication with an efficient log-domain addition. Each posit XX is expressed as:

X=(1)s×(22es)k×2e×(1+f)X = (-1)^s \times (2^{2^{es}})^k \times 2^e \times (1+f)

and the log domain transformation is approximated by:

log2X2esk+e+f\log_2 X \approx 2^{es}k + e + f

Multiplication becomes straightforward: after decoding (sA,kA,eA,fA)(s_A,k_A,e_A,f_A), (sB,kB,eB,fB)(s_B,k_B,e_B,f_B), the product is:

  • sC=sAsBs_C = s_A \oplus s_B
  • K=kA+kBK = k_A + k_B
  • E=eA+eBE = e_A + e_B
  • F=fA+fBF = f_A + f_B (normalized to F<1F<1 with carry propagation).

The hardware structure utilizes compact integer/fixed-point adders and simplified normalization, with worst-case relative error 11.1%\leq 11.1\% in the fraction (Mitchell’s bound).

"Takum Arithmetic" introduces a general-purpose logarithmic tapered-precision format that encodes x=(1)Sexp()x = (-1)^S\exp(\ell), where \ell is constructed from a regime, “characteristic,” and mantissa fields:

  • Fixed regime field (3 bits, r7r\leq7);
  • Characteristic bits encoding cc;
  • Mantissa bits for the fractional part mm;
  • 255|\ell|\leq255 yields dynamic range [e255,e255][e^{-255}, e^{255}], independent of total width for k12k\geq12.

Takum arithmetic directly performs multiplication, division, inversion, and square root as integer operations on \ell, and utilizes Gaussian logarithms (via lookups/interpolation) for addition/subtraction. Relative error is tightly controlled and upper-bounded by <2/3<2/3 of the corresponding float/posit format for equivalent mantissa width (Hunhold, 2024).

3. Hardware Implementation and Complexity

Logarithmic-posit-based designs benefit from log-domain simplification of multipliers—a principal bottleneck in DNN accelerators. In PLAM architectures, the multiplier is replaced by an adder and a normalization path, eliminating expensive FPGA/ASIC resources such as DSP blocks used by classic fixed-point or posit multipliers:

  • On FPGA (Zynq-7000): 16-bit PLAM uses 185 LUTs, 0 DSP; exact posit multipliers require 218–273 LUTs + 1 DSP
  • On 45nm ASIC: PLAM (es=2) vs previous posit-exact saves up to 72.9% area, 81.8% power, and 17.0% delay (Murillo et al., 2021)
  • Compared to IEEE-754 float32 multiplier: 50.4% less area, 66.9% less power

Logarithmic Posit Accelerator (LPA) architectures employ weight-stationary, multi-mode systolic arrays (8×\times8 PEs), with each PE supporting multiple quantization granularities: unified 2’s-complement and regime decode, bit-parallel log-domain adders, and lightweight log\leftrightarrowlinear conversion (Karnaugh-map optimized, not large LUTs).

The LP format's per-layer parametrization is fully exploited through custom hardware datapaths, allowing mixed-precision, high-throughput operation:

  • LPA achieves 2×\times compute density (TOPS/mm2^2) and 2.2×\times energy efficiency vs state-of-the-art (ANT, BitFusion, AdaptivFloat architectures) at similar total die area (Ramachandran et al., 2024).

4. Quantization and DNN Inference Results

Logarithmic-posit quantization addresses DNN layer distribution mismatch more flexibly than fixed integer/floating/fixed-point types. The LP Quantization (LPQ) framework formulates quantization as a genetic search over possible (n,es,rs,sf)(n, es, rs, sf) tuples per layer, using a fitness function that combines a global-local contrastive loss (using kurtosis-3 pooling of intermediate representations) with a compression ratio penalty:

LF=LCO(LCR)λ,λ=0.4\mathcal{L}_F = \mathcal{L}_{CO} \cdot (\mathcal{L}_{CR})^{\lambda}, \quad \lambda=0.4

Evolutionary search comprises ranking, blockwise crossover, diversity-preserving mutation, and population update.

End-to-end accuracy for quantized DNNs (e.g., ResNet18/50, MobileNetV2, ViT-B, DeiT-S, Swin-T) with 4–6 bit mean precision per weight/activation achieves <1%<1\% drop (CNNs) and 2%\approx2\% (ViTs) in Top-1 accuracy relative to full-precision baselines: | Model | Baseline | LPQ Top-1 | Δ\Delta (%) | |------------|----------|-----------|--------------| | ResNet18 | 70.99 | 70.30 | 0.78-0.78 | | ResNet50 | 77.72 | 76.98 | 0.74-0.74 | | MobileNetV2| 72.49 | 71.20 | 1.29-1.29 | | ViT-B | 84.53 | 80.14 | 4.39-4.39 |

On classical posit DNN inference (16-bit, es=1es=1), Top-1 accuracy on MNIST is 98.98% for posit16-PLAM vs 99.03% for posit16-exact and 99.07% for float32—a difference of at most 0.5 percentage-points (Murillo et al., 2021).

5. Dynamic Range, Numerical Precision, and Theoretical Properties

Logarithmic posit and takum variants offer differentiated coverage of the dynamic range and relative error regime:

  • LP: Dynamic range and precision taper are governed by posit-like regime parameters, but allow decoupled scale-factor bias per layer.
  • Takum: The dynamic range is strictly fixed at [e255,e255][e^{-255},e^{255}] for all k12k\geq12, independent of bitwidth—a constant O(1)O(1) growth behavior.
  • Relative error for Takum is x^x/xλ(p)|x̂-x|/|x|\leq \lambda(p), with λ(p)<2/3ϵ(p)λ(p)<2/3\,\epsilon(p), where ϵ(p)\epsilon(p) is the corresponding error for IEEE float or posit with pp mantissa bits.

Arithmetic operations (multiplication/division/inversion/square-root) for both LP and Takum require only integer add/subtract and possible shifting, providing substantial hardware and timing advantages. Addition and subtraction incur a look-up-based, non-uniform error driven by Gaussian log implementations.

Comparative analysis reveals:

  • Takum encodes exponents (regimes) bit-optimally (3 regime bits, up to 11 exponent bits, one time cost), exceeding the efficiency of posit for r>15|r|>15.
  • Waste in range encoding is minimized; Takum achieves essentially zero “wasted” patterns, float8/16/32 waste >80%>80\%, and posit only approaches low waste for k48k\geq48 bits.

6. Selection Criteria, Applications, and Limitations

Logarithmic-posit encodings are advantageous for applications demanding mixed-precision, low-power hardware computation, and flexible quantization tailored to statistical distributions—as in edge DNN inference, large-scale AI accelerators, and general-purpose low-area computation.

Criteria for format selection:

  • For general-purpose arithmetic where a large, constant dynamic range is required, and encoding efficiency for numbers far from unity is crucial, takum outperforms posit.
  • For deep learning applications where value distributions are sharply peaked or non-Gaussian and mixed-memory/compute constraints dominate, LP/PLAM architectures yield quantization-friendly and hardware-optimal implementations (Ramachandran et al., 2024).
  • For extremely low-bit applications focused on accuracy near x1x\approx 1, posit may marginally outperform in addition/subtraction at the cost of global encoding waste.

Limitations include nonuniform error profiles in log-domain addition/subtraction and potential edge artifacts in quantization for highly non-homogeneous layer distributions. The reduced precision in add/sub near the domain endpoints can result in decreased numerically exact operations, particularly in the Takum format for low nn; however, the average precision and closure for nonlinear operations remain superior to existing formats (Hunhold, 2024).

7. Comparative Summary Table

Property Classic Posit Logarithmic Posit (LP) Takum
Dynamic range Tapered, grows \sim linearly with kk Tunable, regime/exponent/scale-factor Constant: [e255,e255][e^{-255},e^{255}] (for k12k\geq12)
Arithmetic Linear domain, special cases near unity Log-domain mul/div, linear add/sub Log-domain for all ops (add/sub via lookup)
Encoding efficiency Suboptimal for r1|r|\gg1 Improved with per-layer tuning Fixed-width, bit-optimal
HW multiplier Complex, large area/power ~2×\times or more area/power saving Adders dominate, small lookup tables
Relative error (mul/div) 2(p+1)2^{-(p+1)} Similar with appropriate eses <2/3<2/3 of float/posit at same pp
DNN inference accuracy <0.5%<0.5\% drop (PLAM) <1%<1\% drop with 4–6 bit mean prec. Not reported for DNNs, see closure metrics
Nonlinear op closure Limited for inv/sqrt Inherits from posit Superior for mul/div/inv/sqrt

The emergence of logarithmic-posit and takum-type encodings exemplifies a broader convergence between adaptive, distribution-aware number systems and log-domain computation, aiming to deliver highly efficient, robust hardware and quantization engines for next-generation machine intelligence and numerical computing.

Topic to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Logarithmic Posit.