Conversion between binary and decimal floating-point representations is ubiquitous. Floating-point radix conversion means converting both the exponent and the mantissa. We develop an atomic operation for FP radix conversion with simple straight-line algorithm, suitable for hardware design. Exponent conversion is performed with a small multiplication and a lookup table. It yields the correct result without error. Mantissa conversion uses a few multiplications and a small lookup table that is shared amongst all types of conversions. The accuracy changes by adjusting the computing precision.
在这里,我提出了C和C++接口和实验实现的双重算法。我在上一篇题为"Twofold fast arithmetic"的文章中介绍了Twofold,用于跟踪浮点不准确性。测试表明,普通C实现了高性能计算的双重功能。C++接口使编码像普通的浮点数一样容易。我的目标是说服你尝试两次;我认为确保数学计算的准确性是值得的。代码和使用的例子可以在我的网站上找到,里面有参考资料。
Verificarlo: checking floating point accuracy through Monte Carlo Arithmetic
CMLA - Centre de Mathématiques et de Leurs Applications, ENS Cachan Université Paris-Saclay et CNRS UMR 8536(CMLA - 数学及其应用中心,巴黎萨克雷大学卡尚分校及法国国家科学研究中心);Université de Versailles Saint-Quentin-en-Yvelines Université Paris-Saclay(凡尔赛圣康坦昂伊夫林大学,巴黎萨克雷大学)
Analysis of Floating-Point Matrix Multiplication Computed via Integer Arithmetic
Innovative Computing Laboratory, University of Tennessee, Knoxville(田纳西大学诺克斯维尔分校创新计算实验室);Department of Mathematics, University of Manchester(曼彻斯特大学数学系);School of Computer Science, University of Leeds(利兹大学计算机科学学院)
Fast multiplication by two's complement addition of numbers represented as a set of polynomial radix 2 indexes, stored as an integer list for massively parallel computation