Improving the Accuracy of the Fast Inverse Square Root by Modifying Newton-Raphson Corrections
Cezary J Walczyk1, Leonid V Moroz2, Jan L Cieśliński1
1Wydział Fizyki, Uniwersytet w Białymstoku, ul. Ciołkowskiego 1L, 15-245 Białystok, Poland.
Entropy (Basel, Switzerland)
|January 13, 2021
Summary
This study introduces improved, low-complexity algorithms for fast inverse square root calculations. These new methods enhance accuracy significantly while maintaining efficient computational costs for floating-point numbers.
Area of Science:
- Computer Science
- Numerical Analysis
- Algorithm Optimization
Background:
- Direct computation of functions is crucial for hardware constraints and data storage challenges.
- Efficient algorithms are needed for processing large datasets and complex calculations.
- The fast inverse square root algorithm is a key function in many computational systems.
Purpose of the Study:
- To develop improved algorithms for the fast calculation of the inverse square root function.
- To enhance accuracy for single-precision and double-precision floating-point numbers.
- To explore higher precision calculations for the inverse square root.
Main Methods:
- Minimizing maximal errors through the optimization of magic constants.
- Modifying Newton-Raphson coefficients for improved accuracy.
- Developing low-complexity algorithms for direct function computation.
Main Results:
- Achieved significantly higher accuracy compared to the original fast inverse square root algorithm.
- Maintained very low computational costs, similar to the original algorithm.
- Demonstrated improved performance for both single-precision and double-precision floating-point numbers.
Conclusions:
- The developed algorithms offer a superior balance of accuracy and computational efficiency.
- These algorithms are suitable for applications with hardware or storage limitations.
- Further exploration into higher precision inverse square root calculations is warranted.
Related Concept Videos
Accuracy, limits, and approximation
954
Accuracy, limits, and approximations are common in many fields, especially in engineering calculations. These concepts are imperative for ensuring that a given value is as close as possible to its true value.
Accuracy is defined as the closeness of the measured value to the true or actual value. In engineering mechanics, repeated measurements are taken during theoretical or experimental analyses to ensure that the result is precise and accurate.
The accuracy of any solution is based on the...
Accuracy is defined as the closeness of the measured value to the true or actual value. In engineering mechanics, repeated measurements are taken during theoretical or experimental analyses to ensure that the result is precise and accurate.
The accuracy of any solution is based on the...
954
Root Mean Square
3.6K
If in an experiment, data values have a probability of being both positive and negative, neither the arithmetic mean, the geometric mean, nor the harmonic mean can be used to calculate the central tendency of the data set. In particular, if the positive and negative values are equally likely, the arithmetic mean is close to zero.
For example, consider the velocity of gas molecules in a container. The gas molecules are moving in different directions, which might impart positive and negative...
For example, consider the velocity of gas molecules in a container. The gas molecules are moving in different directions, which might impart positive and negative...
3.6K
Mechanistic Models: Compartment Models in Algorithms for Numerical Problem Solving
179
Mechanistic models play a crucial role in algorithms for numerical problem-solving, particularly in nonlinear mixed effects modeling (NMEM). These models aim to minimize specific objective functions by evaluating various parameter estimates, leading to the development of systematic algorithms. In some cases, linearization techniques approximate the model using linear equations.
In individual population analyses, different algorithms are employed, such as Cauchy's method, which uses a...
In individual population analyses, different algorithms are employed, such as Cauchy's method, which uses a...
179
NMR Spectrometers: Resolution and Error Correction
923
When magnetic nuclei in a sample achieve resonance and undergo relaxation, the signal detected in NMR is an approximately exponential free induction decay. Fourier transform of an exponential decay yields a Lorentzian peak in the frequency domain. Lorentzian peaks in an NMR spectrum are defined by their amplitude, full width at half maximum, and position, where the peak width is governed by the spin-spin relaxation time alone. In real experiments, however, the applied magnetic field is rendered...
923
Radicals
146
Roots, often written as radicals, identify the quantity that must be raised to a specific exponent to produce a given value. A radical expression consists of two main components: the radicand, which is the value placed inside the root symbol, and the index, which indicates the degree of the root being taken. The notation n√a indicates the principal nth root of a. If n equals 2, the operation is the square root, while n = 3 defines the cube root. When n is even, a negative radicand does not...
146
Newtonian Fluid: Problem Solving
662
Newtonian fluids exhibit a constant viscosity, meaning their shear stress and shear strain rate are directly proportional. This property ensures a predictable and stable response to applied forces, maintaining a linear relationship between force and flow. Examples include water, air, and light oils, consistently demonstrating this proportional behavior regardless of external conditions.
A velocity gradient forms within the fluid when a Newtonian fluid is placed between two parallel plates, with...
A velocity gradient forms within the fluid when a Newtonian fluid is placed between two parallel plates, with...
662


