DSPRelated.com
Code

Inverse Sqrt and Fourth Root approximations

January 31, 2011 Coded in C for the SHARC

Fast InvSqrt approxumation, with an error of less than 4%.  
This was coded by Lippold Haken of Haken Audio, 2010.
This approximation is attributed to Greg Walsh.

// Fast InvSqrt approxumation, with an error of less than 4%. 
// This approximation is attributed to Greg Walsh.
inline void InvSqrt(float *x) {	*(int *)x = 0x5f3759df - (*(int *)x >> 1); } 
inline float SqrtSqrt(float x) { InvSqrt(&x); InvSqrt(&x); return x; }