Level-index arithmetic appeared in the 1980s. One of its principal purposes was 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. It is a trade-off which did not seem to convince the hardware manufacturers. We revisit it 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 level-index representations in machine learning algorithms where narrow bit-width is desired but overflow/underflow of equivalent width floating-point representations causes difficulties.
翻译:阶指数算法出现于20世纪80年代,其主要目的之一是消除浮点运算中的下溢和上溢问题。然而,阶指数算法并未扩展数值集合,而是比浮点表示更大幅度地稀疏大数值的分布,将无穷远点推向更远离零的位置:数值范围两端的间隙变得非常宽大。这是一种权衡策略,似乎并未说服硬件制造商。我们通过开发MATLAB自定义精度模拟器重新审视该算法。该工具箱适用于探究阶指数算法在研究项目中的性能表现,例如在机器学习算法中采用8位和16位阶指数表示时——当需要窄位宽且等宽浮点表示可能出现上溢/下溢问题的场景。