A Modification of the Fast Inverse Square Root Algorithm

被引:6
|
作者
Walczyk, Cezary J. [1 ]
Moroz, Leonid, V [2 ]
Cieslinski, Jan L. [1 ]
机构
[1] Uniwersytet Bialymstoku, Wydzial Fizyki, Ul Ciolkowskiego 1L, PL-15245 Bialystok, Poland
[2] Lviv Polytech Natl Univ, Dept Secur Informat & Technol, St Kn Romana 1-3, UA-79000 Lvov, Ukraine
关键词
floating-point arithmetic; inverse square root; magic constant; Newton-Raphson method; DIVISION; UNIT;
D O I
10.3390/computation7030041
中图分类号
O1 [数学];
学科分类号
0701 ; 070101 ;
摘要
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.
引用
收藏
页数:14
相关论文
共 50 条
  • [1] Fast Differentiable Matrix Square Root and Inverse Square Root
    Song, Yue
    Sebe, Nicu
    Wang, Wei
    [J]. arXiv, 2022,
  • [2] Fast Differentiable Matrix Square Root and Inverse Square Root
    Song, Yue
    Sebe, Nicu
    Wang, Wei
    [J]. IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, 2023, 45 (06) : 7367 - 7380
  • [3] Hardware architecture design and mapping of 'Fast Inverse Square Root' algorithm
    Zafar, Saad
    Adapa, Raviteja
    [J]. 2014 INTERNATIONAL CONFERENCE ON ADVANCES IN ELECTRICAL ENGINEERING (ICAEE), 2014,
  • [4] A Fast FPGA Based Architecture for Computation of Square Root and Inverse Square Root
    Hasnat, Abul
    Bhattacharyya, Tanima
    Dey, Atanu
    Halder, Santanu
    Bhattacharjee, Debotosh
    [J]. PROCEEDINGS OF 2ND INTERNATIONAL CONFERENCE ON 2017 DEVICES FOR INTEGRATED CIRCUIT (DEVIC), 2017, : 383 - 387
  • [5] Fast enclosure for a matrix inverse square root
    Miyajima, Shinya
    [J]. LINEAR ALGEBRA AND ITS APPLICATIONS, 2015, 467 : 116 - 135
  • [6] FAST ALGORITHM COMPUTES SQUARE ROOT
    KOMUSIN, B
    [J]. EDN, 1987, 32 (24) : 250 - 252
  • [7] Square Root and Inverse Square Root Computation Using a Fast FPGA Based Architecture
    Hasnat, Abul
    Dey, Atanu
    Halder, Santanu
    Bhattacharjee, Debotosh
    [J]. JOURNAL OF ACTIVE AND PASSIVE ELECTRONIC DEVICES, 2018, 13 (2-3): : 135 - 147
  • [8] SQUARE-ROOT ALGORITHM IS FAST AND SIMPLE
    GRAPPEL, RD
    [J]. EDN, 1986, 31 (08) : 246 - &
  • [9] SQUARE-ROOT ALGORITHM IS FAST AND SIMPLE
    GRAPPEL, RD
    [J]. EDN, 1988, 33 (15A) : 144 - &
  • [10] Modified Fast Inverse Square Root and Square Root Approximation Algorithms: The Method of Switching Magic Constants
    Moroz, Leonid V.
    Samotyy, Volodymyr V.
    Horyachyy, Oleh Y.
    [J]. COMPUTATION, 2021, 9 (02) : 1 - 23