3 ms·
I think the best paper that explains the magic number (0x5f3759df) is http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf http://www.lomont.org/Math/Papers/2003/
by sandGorgon 17y ago
I think the best paper that explains the magic number (0x5f3759df) is http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf
Lomont traces the history of the algorithm and the possible way that the magic number was derived - including more magic numbers (0x5f375a86)