floatfastsqrt(floatval){inttmp=*(int*)&val;tmp-=1<<23;/* Remove last bit to not let it go to mantissa *//* tmp is now an approximation to logbase2(val) */tmp>>=1;/* divide by 2 */tmp+=1<<29;/* add 64 to exponent: (e+127)/2 =(e/2)+63, *//* that represents (e/2)-64 but we want e/2 */return*(float*)&tmp;}