I've been pretty far behind on feeds lately, which means catching up in binges, which means missing out on things that take some time to process and follow up on. luckily jauricchio always seems to be looking out for me.

take for example the Academia vs. Business comic from xkcd, clearly written with an academic's bias (as pointed out by Wil Shipley). I left it at that, completely skipping the tooltip, which referred to the value 0x5f375a86 as being special. luckily jauricchio caught it and looked it up: it was part of the fast computation of inverse square roots (used a lot in 3-D graphics) and was later revised to the current value, 0x5f3759df. the code, courtesy Wikipedia:

float InvSqrt (float x)
{
    float xhalf = 0.5f*x;
    int i = *(int*)&x;
    i = 0x5f3759df - (i>>1);
    x = *(float*)&i;
    return x*(1.5f - xhalf*x*x);
}
the Wikipedia page also contains the math that isolated the correct magic number.

I love hacks like this.