Next Article in Journal
Recent Progress towards Chemically-Specific Coarse-Grained Simulation Models with Consistent Dynamical Properties
Previous Article in Journal
Design and Implementation of a Microcontroller Based Active Controller for the Synchronization of the Petrzela Chaotic System
Open AccessArticle

A Modification of the Fast Inverse Square Root Algorithm

1
Wydział Fizyki, Uniwersytet w Białymstoku, ul. Ciołkowskiego 1L, 15-245 Białystok, Poland
2
Department of Security Information and Technology, Lviv Polytechnic National University, st. Kn. Romana 1/3, 79000 Lviv, Ukraine
*
Author to whom correspondence should be addressed.
Computation 2019, 7(3), 41; https://doi.org/10.3390/computation7030041
Received: 28 June 2019 / Revised: 12 August 2019 / Accepted: 14 August 2019 / Published: 18 August 2019
(This article belongs to the Section Computational Engineering)
We present a new algorithm for the approximate evaluation of the inverse square root for single-precision floating-point numbers. This is a modification of the famous fast inverse square root code. We use the same “magic constant” to compute the seed solution, but then, we apply Newton–Raphson corrections with modified coefficients. As compared to the original fast inverse square root code, the new algorithm is two-times more accurate in the case of one Newton–Raphson correction and almost seven-times more accurate in the case of two corrections. We discuss relative errors within our analytical approach and perform numerical tests of our algorithm for all numbers of the type float. View Full-Text
Keywords: floating-point arithmetic; inverse square root; magic constant; Newton–Raphson method floating-point arithmetic; inverse square root; magic constant; Newton–Raphson method
Show Figures

Figure 1

MDPI and ACS Style

Walczyk, C.J.; Moroz, L.V.; Cieśliński, J.L. A Modification of the Fast Inverse Square Root Algorithm. Computation 2019, 7, 41.

Show more citation formats Show less citations formats
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Back to TopTop