Redirigiendo al acceso original de articulo en 20 segundos...
Inicio  /  Computation  /  Vol: 9 Par: 2 (2021)  /  Artículo
ARTÍCULO
TITULO

Modified Fast Inverse Square Root and Square Root Approximation Algorithms: The Method of Switching Magic Constants

Leonid V. Moroz    
Volodymyr V. Samotyy and Oleh Y. Horyachyy    

Resumen

Many low-cost platforms that support floating-point arithmetic, such as microcontrollers and field-programmable gate arrays, do not include fast hardware or software methods for calculating the square root and/or reciprocal square root. Typically, such functions are implemented using direct lookup tables or polynomial approximations, with a subsequent application of the Newton?Raphson method. Other, more complex solutions include high-radix digit-recurrence and bipartite or multipartite table-based methods. In contrast, this article proposes a simple modification of the fast inverse square root method that has high accuracy and relatively low latency. Algorithms are given in C/C++ for single- and double-precision numbers in the IEEE 754 format for both square root and reciprocal square root functions. These are based on the switching of magic constants in the initial approximation, depending on the input interval of the normalized floating-point numbers, in order to minimize the maximum relative error on each subinterval after the first iteration?giving 13 correct bits of the result. Our experimental results show that the proposed algorithms provide a fairly good trade-off between accuracy and latency after two iterations for numbers of type float, and after three iterations for numbers of type double when using fused multiply?add instructions?giving almost complete accuracy.

 Artículos similares

       
 
Charalampos Skoulikaris    
Large-scale hydrological modeling is an emerging approach in river hydrology, especially in regions with limited available data. This research focuses on evaluating the performance of two well-known large-scale hydrological models, namely E-HYPE and LISF... ver más
Revista: Water

 
Xuanshuo Shi, Zhongfeng Qiu, Yunjian Hu, Dongzhi Zhao, Aibo Zhao, Hui Lin, Yating Zhan, Yu Wang and Yuanzhi Zhang    
Remote sensing technology plays a crucial role in the rapid and wide-scale monitoring of water quality, which is of great significance for water pollution prevention and control. In this study, the downstream and nearshore areas of the Huaihe River Basin... ver más
Revista: Water

 
Fahad Alshehri and Mark Ross    
This hydrological study investigated a combined rating methodology tested on a 14,090 km2 area in Southwest Florida. The approach applied the Hydrological Simulation Program-Fortran (HSPF) over a 23-year period and was validated by 28 stream gauging stat... ver más
Revista: Water

 
Ahmed Skhiri, Ali Ferhi, Anis Bousselmi, Slaheddine Khlifi and Mohamed A. Mattar    
A correct determination of irrigation water requirements necessitates an adequate estimation of reference evapotranspiration (ETo). In this study, monthly ETo is estimated using artificial neural network (ANN) models. Eleven combinations of long-term ave... ver más
Revista: Water

 
Nuaman Ejaz, Aftab Haider Khan, Muhammad Shahid, Kifayat Zaman, Khaled S. Balkhair, Khalid Mohammed Alghamdi, Khalil Ur Rahman and Songhao Shang    
Satellite precipitation products (SPPs) are undeniably subject to uncertainty due to retrieval algorithms and sampling issues. Many research efforts have concentrated on merging SPPs to create high-quality merged precipitation datasets (MPDs) in order to... ver más
Revista: Water