Square root any nonnegative number, then the principal square root of −"x" is The right side (as well as its negative) is indeed a square root of −"x", since For every non-zero complex number "z" there exist precisely two numbers "w" such that : the principal square root of "z" (defined below), and its negative. There are two complex numbers that square to a given arbitrary non-zero imaginary number formula_11 with real formula_12 where the two-digit pattern {3, 6} repeats over and over again in the partial denominators. Since , the above is also identical to the following generalized continued fractions: The
Fast inverse square root to compute because this equation is equivalent to where the fraction term is the inverse square root of . At the time, floating-point division was generally expensive compared to multiplication; the fast inverse square root algorithm bypassed the division step, giving it its performance advantage. "Quake III Arena", a first-person shooter video game, used the fast inverse square root algorithm to accelerate graphics computation, but the algorithm has since been implemented in some dedicated hardware vertex shaders using field-programmable gate arrays (FPGA). The following code is the fast inverse square root implementation from "Quake III Arena", stripped of C preprocessor