Generalising the Fast Reciprocal Square Root Algorithm

07/28/2023
by   Mike Day, et al.
0

The Fast Reciprocal Square Root Algorithm is a well-established approximation technique consisting of two stages: first, a coarse approximation is obtained by manipulating the bit pattern of the floating point argument using integer instructions, and second, the coarse result is refined through one or more steps, traditionally using Newtonian iteration but alternatively using improved expressions with carefully chosen numerical constants found by other authors. The algorithm was widely used before microprocessors carried built-in hardware support for computing reciprocal square roots. At the time of writing, however, there is in general no hardware acceleration for computing other fixed fractional powers. This paper generalises the algorithm to cater to all rational powers, and to support any polynomial degree(s) in the refinement step(s), and under the assumption of unlimited floating point precision provides a procedure which automatically constructs provably optimal constants in all of these cases. It is also shown that, under certain assumptions, the use of monic refinement polynomials yields results which are much better placed with respect to the cost/accuracy tradeoff than those obtained using general polynomials. Further extensions are also analysed, and several new best approximations are given.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/13/2023

Fast evaluation and root finding for polynomials with floating-point coefficients

Evaluating or finding the roots of a polynomial f(z) = f_0 + ⋯ + f_d z^d...
research
03/14/2016

Fast calculation of inverse square root with the use of magic constant - analytical approach

We present a mathematical analysis of transformations used in fast calcu...
research
02/17/2018

Improving the accuracy of the fast inverse square root algorithm

We present improved algorithms for fast calculation of the inverse squar...
research
07/22/2023

Numerical computation of the roots of Mandelbrot polynomials: an experimental analysis

This paper deals with the problem of numerically computing the roots of ...
research
11/06/2019

Fast Derivatives for Multilinear Polynomials

The article considers linear functions of many (n) variables - multiline...
research
03/06/2021

The numerical greatest common divisor of univariate polynomials

This paper presents a regularization theory for numerical computation of...
research
07/09/2020

A Novel Approach to Generate Correctly Rounded Math Libraries for New Floating Point Representations

Given the importance of floating-point (FP) performance in numerous doma...

Please sign up or login with your details

Forgot password? Click here to reset