Raíz cuadrada inversa
Posted on December 9th, 2006 by Christian López Espínola
-
float InvSqrt (float x) {
-
float xhalf = 0.5f*x;
-
int i = *(int*)&x;
-
i = 0×5f3759df - (i >> 1);
-
x = *(float*)&i;
-
x = x*(1.5f - xhalf*x*x);
-
return x;
-
}
Historia de la función en Quarkblog
Filed under: Coding, Computer Science, Personal, Software Engineering | Tagged: Research








