Quake III & the reciprocal square root

A marveleous algorithm for a fast computation of the reciprocal square root

In the C source code of the famous game you can find an incredibly efficient piece of code that seems totally insane and incomprehensible! It is the code for computing the reciprocal of the square root of a 32-bit floating point number x. It is usually also known as Fast Inverse Square Root, but I…