Table of Contents
Fetching ...

MATLAB Simulator of Level-Index Arithmetic

Mantas Mikaitis

TL;DR

This work revisits level-index arithmetic and introduces a symmetric level-index (SLI) encoding, implemented as a MATLAB simulator (sli.m) to study accuracy and robustness of low-bit-width arithmetic. By comparing SLI against fixed-precision floating-point representations, the paper demonstrates extended dynamic range and overflow resistance while maintaining competitive accuracy in representative tasks such as matvec. It provides detailed encoding, an executable toolbox, and experimental results that can inform algorithm design and potential hardware implementations for narrow-bit arithmetic. The contribution includes practical guidance for using SLI to stress-test numerical methods and to drive hardware considerations in applications where overflow/underflow is problematic.

Abstract

Level-index arithmetic appeared in the 1980s. One of its principal purposes is to abolish the issues caused by underflows and overflows in floating point. However, level-index arithmetic does not expand the set of numbers but spaces out the numbers of large magnitude even more than floating-point representations to move the infinities further away from zero: gaps between numbers on both ends of the range become very large. We revisit level index by presenting a custom precision simulator in MATLAB. This toolbox is useful for exploring performance of level-index arithmetic in research projects, such as using 8-bit and 16-bit representations in machine learning algorithms where narrow bit-width is desired but overflow/underflow of floating-point representations causes difficulties.

MATLAB Simulator of Level-Index Arithmetic

TL;DR

This work revisits level-index arithmetic and introduces a symmetric level-index (SLI) encoding, implemented as a MATLAB simulator (sli.m) to study accuracy and robustness of low-bit-width arithmetic. By comparing SLI against fixed-precision floating-point representations, the paper demonstrates extended dynamic range and overflow resistance while maintaining competitive accuracy in representative tasks such as matvec. It provides detailed encoding, an executable toolbox, and experimental results that can inform algorithm design and potential hardware implementations for narrow-bit arithmetic. The contribution includes practical guidance for using SLI to stress-test numerical methods and to drive hardware considerations in applications where overflow/underflow is problematic.

Abstract

Level-index arithmetic appeared in the 1980s. One of its principal purposes is to abolish the issues caused by underflows and overflows in floating point. However, level-index arithmetic does not expand the set of numbers but spaces out the numbers of large magnitude even more than floating-point representations to move the infinities further away from zero: gaps between numbers on both ends of the range become very large. We revisit level index by presenting a custom precision simulator in MATLAB. This toolbox is useful for exploring performance of level-index arithmetic in research projects, such as using 8-bit and 16-bit representations in machine learning algorithms where narrow bit-width is desired but overflow/underflow of floating-point representations causes difficulties.
Paper Structure (9 sections, 9 equations, 6 figures, 1 table)

This paper contains 9 sections, 9 equations, 6 figures, 1 table.

Figures (6)

  • Figure 1: Layout of a possible 16-bit SLI encoding: sli-3.11.
  • Figure 2: Layout of an unsigned 5-bit toy floating-point system high21 (top) and two unsigned SLI systems: sli-1.3 (bottom left) and sli-2.2 (bottom right).
  • Figure 3: Relative accuracy of binary16 and a 16-bit level-index representation compared with binary64.
  • Figure 4: Relative accuracy of bfloat16 and a 16-bit level-index representation compared with binary64.
  • Figure 5: Backward error in $Ax$ with binary16 and sli compared with binary64.
  • ...and 1 more figures