Algorithms for Stochastically Rounded Elementary Arithmetic Operations in IEEE 754 Floating-Point Arithmetic

被引:13
作者
Fasi, Massimiliano [1 ]
Mikaitis, Mantas [2 ]
机构
[1] Orebro Univ, Sch Sci & Technol, S-70182 Orebro, Sweden
[2] Univ Manchester, Dept Math, Manchester M13 9PL, Lancs, England
基金
英国工程与自然科学研究理事会;
关键词
Stochastic processes; Hardware; Standards; Tools; Software; Libraries; Monte Carlo methods; Floating-point arithmetic; error-free transformation; stochastic rounding; numerical analysis; numerical algorithm; IEEE; 754;
D O I
10.1109/TETC.2021.3069165
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
We present algorithms for performing the five elementary arithmetic operations (+, -, x, divided by, and root) in floating point arithmetic with stochastic rounding, and demonstrate the value of these algorithms by discussing various applications where stochastic rounding is beneficial. The algorithms require that the hardware be compliant with the IEEE 754 floating-point standard and that a floating-point pseudorandom number generator be available. The goal of these techniques is to emulate stochastic rounding when the underlying hardware does not support this rounding mode, as is the case for most existing CPUs and GPUs. By simulating stochastic rounding in software, one has the possibility to explore the behavior of this rounding mode and develop new algorithms even without having access to hardware implementing stochastic rounding- once such hardware becomes available, it suffices to replace the proposed algorithms by calls to the corresponding hardware routines. When stochastically rounding double precision operations, the algorithms we propose are between 7.3 and 19 times faster than the implementations that use the GNU MPFR library to simulate extended precision. We test our algorithms on various tasks, including summation algorithms and solvers for ordinary differential equations, where stochastic rounding is expected to bring advantages.
引用
收藏
页码:1451 / 1466
页数:16
相关论文
共 45 条
[1]  
Alben J. M., 2019, U.S. Patent, Patent No. [20 190 377 549A1, 20190377549]
[2]  
[Anonymous], 2013, IRISH MATH SOC B
[3]  
[Anonymous], 1997, ART COMPUTER PROGRAM
[4]  
[Anonymous], 2019, 7542019 IEEE
[5]   A CLASS OF FAST AND ACCURATE SUMMATION ALGORITHMS [J].
Blanchard, Pierre ;
Higham, Nicholas J. ;
Mary, Theo .
SIAM JOURNAL ON SCIENTIFIC COMPUTING, 2020, 42 (03) :A1541-A1557
[6]  
Bohlender G., 1991, Proceedings. 10th IEEE Symposium on Computer Arithmetic (Cat. No.91CH3015-5), P22, DOI 10.1109/ARITH.1991.145529
[7]   Representable correcting terms for possibly underflowing floating point operations [J].
Boldo, S ;
Daumas, M .
16TH IEEE SYMPOSIUM ON COMPUTER ARITHMETIC, PROCEEDINGS, 2003, :79-86
[8]  
Boldo S., 2020, IEEE T COMPUT
[9]   On the Robustness of the 2Sum and Fast2Sum Algorithms [J].
Boldo, Sylvie ;
Graillat, Stef ;
Muller, Jean-Michel .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2017, 44 (01)
[10]  
Bradbury J. D., 2019, US Patent, Patent No. [10445066, 10,445,066]