0×5f3759df

Uma adivinha! Derretam neurónios..

C:
  1. float adivinha(float x)
  2. {
  3. float xhalf = 0.5f*x;
  4. int i = *(int*) x;
  5. i = 0x5f3759df - (i>>1);
  6. x = *(float*) &i;
  7. x = x*(1.5f-xhalf*x*x);
  8. return x;
  9. }

O que raio é que isto faz? : D

3 Responses to “0×5f3759df”

  1. 01/04/07 at 12:55

    raca using Opera Opera 9.12 on Windows Windows XP says:

    eu sei :p

  2. 02/04/07 at 19:12

    jag using Mozilla Firefox Mozilla Firefox 2.0.0.3 on Mac OS Mac OS X says:

    Eu tb :D

  3. 02/04/07 at 21:21

    luke using Mozilla Firefox Mozilla Firefox 2.0.0.3 on Ubuntu Linux Ubuntu Linux says:

    zomg, macfag ftw!

Leave a Reply