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.
