当前位置: X-MOL 学术ACM Trans. Math. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
IEEE-754 Precision-p base-β Arithmetic Implemented in Binary
ACM Transactions on Mathematical Software ( IF 2.7 ) Pub Date : 2023-12-15 , DOI: 10.1145/3596218
SIEGFRIED M. Rump 1
Affiliation  

We show how an IEEE-754 conformant precision-p base-β arithmetic can be implemented based on some binary floating-point and/or integer arithmetic. This includes the four basic operations and square root subject to the five IEEE-754 rounding modes, namely the nearest roundings with roundTiesToEven and roundTiesToAway, the directed roundings downwards and upwards, as well as rounding towards zero. Exceptional values like ∞ of NaN are covered according to the IEEE-754 arithmetic standard.

The results of the precision-p base-β operations are computed using some underlying precision-q binary arithmetic. We distinguish two cases. When using a precision-q binary integer arithmetic, the base-β precision p is limited for all operations by β2p ≤ 2q, whereas using a precision-q binary floating-point arithmetic imposes stronger limits on the base-β precision, namely β2p ≤ 2q for addition and multiplication, β2p ≤ 2q-1 for division and β2p ≤ 2q-3 for the square root. Those limitations cannot be improved.

The algorithms are implemented in a Matlab/Octave flbeta-toolbox with the choice of using uint64 or binary64 as underlying arithmetic. The former allows larger precisions, the latter is advantageous for the square root, whereas computing times are similar. The flbeta-toolbox offers precision-p base-β scalar, vector and matrix operations including sparse matrices as well as corresponding interval operations. The base β can be chosen in the range β ∊ [2,64]. The flbeta-toolbox will be part of Version 13 of INTLAB [18], the Matlab/Octave toolbox for reliable computing.



中文翻译:


以二进制实现的 IEEE-754 精度 p 基 β 算法



我们展示了如何基于一些二进制浮点和/或整数算术来实现符合 IEEE-754 标准的 precision-p base-β 算术。这包括符合五种 IEEE-754 舍入模式的四种基本运算和平方根,即使用 roundTiesToEven 和 roundTiesToAway 进行的最近舍入、向下和向上的定向舍入以及向零舍入。根据 IEEE-754 算术标准,涵盖了像 NaN 的 ∞ 这样的特殊值。


precision-p base-β 运算的结果是使用一些基础 precision-q 二进制算术来计算的。我们区分两种情况。使用精度 q 二进制整数算术时,所有运算的基数 β 精度 p 受到 β 2p ≤ 2 q 的限制,而使用精度 q 二进制浮点数算术对基β精度施加了更强的限制,即加法和乘法β 2p ≤ 2 q ,β 2p ≤ 2 q-1 用于除法,β 2p ≤ 2 q-3 用于平方根。这些限制无法得到改善。


这些算法在 Matlab/Octave flbeta 工具箱中实现,可以选择使用 uint64 或 binary64 作为底层算法。前者允许更大的精度,后者有利于平方根,而计算时间相似。 flbeta-toolbox 提供精度 p 基 β 标量、向量和矩阵运算,包括稀疏矩阵以及相应的区间运算。基数 β 可以在 β ∊ [2,64] 范围内选择。 flbeta-toolbox 将成为 INTLAB [18] 版本 13 的一部分,INTLAB [18] 是用于可靠计算的 Matlab/Octave 工具箱。

更新日期:2023-12-15
down
wechat
bug