4 ms·
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates 1/√x, the reciprocal
by geoah 8y ago
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates 1/√x, the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x in IEEE 754 floating-point format.
https://en.m.wikipedia.org/wiki/Fast_inverse_square_root https://en.m.wikipedia.org/wiki/Fast_inverse_square_root
I especially love the story around it.
- Const-me 8y agoIt’s nice but it’s deprecated, we now have hardware support for that in CPUs. PC: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#!=undefined&text=_mm_rsqrt&expand=4770 https://software.intel.com/sites/landingpage/IntrinsicsGuide... ARM: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491h/BABFCGDJ.html http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....
- jedimastert 8y agoThis is how I tell people that Computer Science can still have magic to it.