Just wanted to stash this little tidbit here in case I needed it for something.
This Slashdot article bringing up Origin of Quake3’s Fast InvSqrt(). The original article is a bit of a sleuthing expedition looking for the origins of this little code snippet and makes for an interesting read along with pointing to some other interesting sources.
The algorithm is a remarkable in the way it hides a lot of complexity in a simple looking package. All it does is calculate 1/sqrt(x), but does it very quickly using a cleverly written Newton-Raphson method.