0×5f3759df
Uma adivinha! Derretam neurónios..
C:
-
float adivinha(float x)
-
{
-
float xhalf = 0.5f*x;
-
int i = *(int*) x;
-
i = 0x5f3759df - (i>>1);
-
x = *(float*) &i;
-
x = x*(1.5f-xhalf*x*x);
-
return x;
-
}
O que raio é que isto faz? : D
This entry was posted by ponto on Sunday, April 1st, 2007 at 9:47 am and is filed under Adivinhas Geeks. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
01/04/07 at 12:55
eu sei :p
02/04/07 at 19:12
Eu tb :D
02/04/07 at 21:21
zomg, macfag ftw!