MENU

Fun & Interesting

MegaFavNumbers | The magic number and the legendary fast inverse square root hack.

Rodrigo Aldana 4,533 5 years ago
Video Not Working? Fix It Now

Hi! I'm Rodrigo Aldana. This is my contribution to the #MegaFavNumbers project. This video is based on a presentation I gave some time ago about the fast inverse square root algorithm but now focused on the related magic number 1597463007. I want to make something clear: 1597463007 is not my favorite number, but an excuse to participate in #MegaFavNumbers. In fact, I hate that number. Anticipated apologies or the typos and inaccuracies in the video (there are some instances of the word "positive" that should have been "non-negative" and vice versa). I hope that the message of the video is still clear. Moreover, I say that *any* computer supports the floating point representation. Which is kinda subtle. It may be the case in which a computer's processor does not have a floating point unit. Hence, the compiler (of the language you are using) have to take care of the floating point arithmetic. For detailed information on the algorithm you may want to check these documents: https://www.lomont.org/papers/2003/InvSqrt.pdf https://arxiv.org/pdf/1603.04483.pdf The magician of the thumbnail and in the second slide, is a tribute to the "Structure and Interpretation of Computer Programs book", which for me is one of the most important books in computer science. I'm currently a Computer Science Ph.D. student at the University of Zaragoza, in Spain. If you are curious, I have worked in the following projects too: https://www.youtube.com/watch?v=DJ1IZRL5t1Q https://www.youtube.com/watch?v=79IFfQfvXLE My google scholar and research gate pages are the following: https://scholar.google.es/citations?user=mmp6hHQAAAAJ&hl=es https://www.researchgate.net/profile/Rodrigo_Aldana Thank you for watching!

Comment