arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1009.5911physics.comp-phphysics.ed-ph
收藏

超越浮点数精度的算术运算

Arithmetic Operations Beyond Floating Point Number Precision

Chih-Yueh Wang, Chen-Yang Yin, Hong-Yu Chen, Yung-Ko Chen

摘要:

在基础计算物理课上,学生们经常会提出这样的问题:如何计算一个超过机器数值极限的数。虽然避免上溢/下溢的技术在电气和电子工程行业中有实际应用,但它在科学计算中并不常用,因为科学计数法在大多数情况下已经足够了。我们提出了一个本科项目,处理这种计算超出了机器的数值限制,称为任意精度算术。作业要求学生使用基本的科学编程语言Fortran研究计算超出浮点数精度的大数字的精确值的方法。其基本思想是利用数组来分解数字并分配有限的内存。给出了偶数的连续乘法和两个溢出浮点数的乘除运算实例。多精度方案已被应用于数字信号处理(DSP)系统的硬件和固件设计,并在科学计算中越来越重要。这些基本的算术运算可以被集成来解决高级数学问题,几乎可以达到任意高的精度,这是由主机内存限制的。

英文摘要:

In basic computational physics classes, students often raise the question of how to compute a number that exceeds the numerical limit of the machine. While technique of avoiding overflow/underflow has practical application in the electrical and electronics engineering industries, it is not commonly utilized in scientific computing, because scientific notation is adequate in most cases. We present an undergraduate project that deals with such calculations beyond a machine's numerical limit, known as arbitrary precision arithmetic. The assignment asks students to investigate the approach of calculating the exact value of a large number beyond the floating point number precision, using the basic scientific programming language Fortran. The basic concept is to utilize arrays to decompose the number and allocate finite memory. Examples of the successive multiplication of even number and the multiplication and division of two overflowing floats are presented. The multiple precision scheme has been applied to hardware and firmware design for digital signal processing (DSP) systems, and is gaining importance to scientific computing. Such basic arithmetic operations can be integrated to solve advanced mathematical problems to almost arbitrarily-high precision that is limited by the memory of the host machine.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑