Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections
Direct computation of functions using low-complexity algorithms can be applied both for hardware constraints and in systems where storage capacity is a challenge for processing a large volume of data. We present improved algorithms for fast calculation of the inverse square root function for single-...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2021-01-01
|
Series: | Entropy |
Subjects: | |
Online Access: | https://www.mdpi.com/1099-4300/23/1/86 |
_version_ | 1797414095189704704 |
---|---|
author | Cezary J. Walczyk Leonid V. Moroz Jan L. Cieśliński |
author_facet | Cezary J. Walczyk Leonid V. Moroz Jan L. Cieśliński |
author_sort | Cezary J. Walczyk |
collection | DOAJ |
description | Direct computation of functions using low-complexity algorithms can be applied both for hardware constraints and in systems where storage capacity is a challenge for processing a large volume of data. We present improved algorithms for fast calculation of the inverse square root function for single-precision and double-precision floating-point numbers. Higher precision is also discussed. Our approach consists in minimizing maximal errors by finding optimal magic constants and modifying the Newton–Raphson coefficients. The obtained algorithms are much more accurate than the original fast inverse square root algorithm and have similar very low computational costs. |
first_indexed | 2024-03-09T05:27:05Z |
format | Article |
id | doaj.art-3a6c2dd2d6bc40559c5cb30335a6f88e |
institution | Directory Open Access Journal |
issn | 1099-4300 |
language | English |
last_indexed | 2024-03-09T05:27:05Z |
publishDate | 2021-01-01 |
publisher | MDPI AG |
record_format | Article |
series | Entropy |
spelling | doaj.art-3a6c2dd2d6bc40559c5cb30335a6f88e2023-12-03T12:35:23ZengMDPI AGEntropy1099-43002021-01-012318610.3390/e23010086Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson CorrectionsCezary J. Walczyk0Leonid V. Moroz1Jan L. Cieśliński2Wydział Fizyki, Uniwersytet w Białymstoku, ul. Ciołkowskiego 1L, 15-245 Białystok, PolandDepartment of Security Information and Technology, Lviv Polytechnic National University, st. Kn. Romana 1/3, 79000 Lviv, UkraineWydział Fizyki, Uniwersytet w Białymstoku, ul. Ciołkowskiego 1L, 15-245 Białystok, PolandDirect computation of functions using low-complexity algorithms can be applied both for hardware constraints and in systems where storage capacity is a challenge for processing a large volume of data. We present improved algorithms for fast calculation of the inverse square root function for single-precision and double-precision floating-point numbers. Higher precision is also discussed. Our approach consists in minimizing maximal errors by finding optimal magic constants and modifying the Newton–Raphson coefficients. The obtained algorithms are much more accurate than the original fast inverse square root algorithm and have similar very low computational costs.https://www.mdpi.com/1099-4300/23/1/86approximation of functionsfloating-point arithmeticNewton–Raphson methodinverse square rootmagic constant |
spellingShingle | Cezary J. Walczyk Leonid V. Moroz Jan L. Cieśliński Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections Entropy approximation of functions floating-point arithmetic Newton–Raphson method inverse square root magic constant |
title | Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections |
title_full | Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections |
title_fullStr | Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections |
title_full_unstemmed | Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections |
title_short | Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton–Raphson Corrections |
title_sort | improving the accuracy of the fast inverse square root by modifying newton raphson corrections |
topic | approximation of functions floating-point arithmetic Newton–Raphson method inverse square root magic constant |
url | https://www.mdpi.com/1099-4300/23/1/86 |
work_keys_str_mv | AT cezaryjwalczyk improvingtheaccuracyofthefastinversesquarerootbymodifyingnewtonraphsoncorrections AT leonidvmoroz improvingtheaccuracyofthefastinversesquarerootbymodifyingnewtonraphsoncorrections AT janlcieslinski improvingtheaccuracyofthefastinversesquarerootbymodifyingnewtonraphsoncorrections |