Abstract
The purpose of this paper is to introduce a modification of Fast Inverse Square Root (FISR) approximation algorithm with reduced relative errors. The original algorithm uses a magic constant trick with input floating-point number to obtain a clever initial approximation and then utilizes the classical iterative Newton-Raphson formula. It was first used in the computer game Quake III Arena, causing widespread discussion among scientists and programmers, and now it can be frequently found in many scientific applications, although it has some drawbacks. The proposed algorithm has such parameters of the modified inverse square root algorithm that minimize the relative error and includes two magic constants in order to avoid one floating-point multiplication. In addition, we use the fused multiply-add function and iterative methods of higher order in the second iteration to improve the accuracy. Such algorithms do not require storage of large tables for initial approximation and can be effectively used on field-programmable gate arrays (FPGAs) and other platforms without hardware support for this function.
Highlights
When solving many important problems in the field of digital signal processing, computer 3D graphics, scientific computing, etc., it is necessary to use floating-point arithmetic [1,2,3,4,5,6,7] as the most accurate and common way of representing real numbers in computers
We have proposed the Fast Inverse Square Root (FISR)-based inverse square root calculation algorithms that contain one less floating-point multiplication by introducing an additional magic constant
The practical value of the results lies in the fact that the proposed algorithms can replace the basic FISR method in many applications, which increases the accuracy of calculations and reduces the latency on some platforms
Summary
When solving many important problems in the field of digital signal processing, computer 3D graphics, scientific computing, etc., it is necessary to use floating-point arithmetic [1,2,3,4,5,6,7] as the most accurate and common way of representing real numbers in computers. A common practical task that arises when working with floating-point numbers is the calculation of elementary functions, including the inverse square root: y . The algorithms implementing the inverse square root calculation are widely described in scientific literature [1, 6, 8,9,10,11,12,13,14]. The initial approximation is formed using integer arithmetic in the form of so-called magic constant, and upon transition from integer arithmetic to floating-point arithmetic, the resulting approximation is fed into an iterative process using corresponding NewtonRaphson formulae
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.