Thursday, June 21, 2018

xxx

xxx

Sunday, June 17, 2018

Inverse square root

xx

https://pastebin.com/4Afm45AH

https://en.wikipedia.org/wiki/Fast_inverse_square_root

www.beyond3d.com/content/articles/8/ www.beyond3d.com/content/articles/8/www.beyond3d.com/content/articles/15/ www.beyond3d.com/content/articles/15/www.lomont.org/Math/Papers/2003/InvSqrt.pdf www.lomont.org/Math/Papers/2003/InvSqrt.pdfbetterexplained.com/articles/understanding-quakes-fast-inverse-square-root/betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/

Even IĀ still adore Data Particles IĀ ā€œinventedā€ almost 10 years ago, without proper tools (I struggle to create) it's quite hard to manage the data. IĀ encounter it from time to time when IĀ need to fix some order in our intranet app.

So for QB IĀ decided to move from Data Particles to JSON structure IĀ created for Qedy. It suits the purpose rather well and IĀ can improve it to be mutually beneficial.

  1. float Q_rsqrt(float number)
  2. {
  3. long i;
  4. float x2, y;
  5. const float threehalfs = 1.5F; x2 = number * 0.5F; y = number; i = *(long *) &y; // evil floating point bit level hacking i = 0x5f3759df - ( i >> 1 ); // what the fuck? y = *(float *) &i; y = y * (threehalfs - (x2 * y * y)); // 1st iteration // y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration
  6. return y;
  7. }

I created aĀ simple parser, that runs for every ID, which is time consuming, but there's no rush.