z-logo
open-access-imgOpen Access
SIMPLE EFFECTIVE FAST INVERSE SQUARE ROOT ALGORITHM WITH TWO MAGIC CONSTANTS
Author(s) -
Oleh Horyachyy,
Leonid Moroz,
Viktor Otenko
Publication year - 2019
Publication title -
computing
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.184
H-Index - 11
eISSN - 2312-5381
pISSN - 1727-6209
DOI - 10.47839/ijc.18.4.1616
Subject(s) - square root , algorithm , inverse , computer science , magic (telescope) , approximation error , double precision floating point format , multiplication (music) , function (biology) , newton's method , inverse function , floating point , mathematics , combinatorics , nonlinear system , physics , geometry , quantum mechanics , evolutionary biology , biology
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.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here