Name: Anonymous 2010-07-05 16:04
Design a fast square root function which computes double floating point numbers faster than SQRTSD(SSE2). Bonus for precision.
double sqrts[18446744073709551616] = {
/* the contents of this array are left as an exercise for the reader */
double fastsqrt(double f) {
int64_t *idx = (int64_t*)&f;
return sqrts[*idx];
}