Title: Arithmetic operations beyond floating point number precision

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

Addresses: Department of Physics, Chung-Yuan Christian University, 200 Chung-Pei Road, Chung-Li, 32023, Taiwan. ' Department of Physics, Chung-Yuan Christian University, 200 Chung-Pei Road, Chung-Li, 32023, Taiwan. ' Institute of Astronomy, National Tsing Hua University, Hsinchu, 30013, Taiwan. ' National Synchrotron Radiation Research Center, Hsinchu, 30076, Taiwan

Abstract: 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 utilised 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 utilise 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 schemes have 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.

Keywords: computational physics education; floating point number; overflow; underflow; arbitrary precision arithmetic; Fortran; GPU; scientific computing; hardware design; firmware design; digital signal processing; DSP; machine numerical limits.

DOI: 10.1504/IJCSE.2011.042024

International Journal of Computational Science and Engineering, 2011 Vol.6 No.3, pp.206 - 215

Received: 28 Nov 2010
Accepted: 29 Apr 2011

Published online: 18 Mar 2015 *

Full-text access for editors Full-text access for subscribers Purchase this article Comment on this article