![]() |
|
Fast inverse square root [WIKIPEDIA] - Printable Version +- MKLab (https://mklab.gr) +-- Forum: [INDEX] (https://mklab.gr/forumdisplay.php?fid=1) +--- Forum: MATHEMATICS (https://mklab.gr/forumdisplay.php?fid=3) +---- Forum: ARTICLES (https://mklab.gr/forumdisplay.php?fid=13) +---- Thread: Fast inverse square root [WIKIPEDIA] (/showthread.php?tid=408) |
Fast inverse square root [WIKIPEDIA] - mklabgr - 06-16-2026 Fast inverse square root BY [WIKIPEDIA] Summary The fast inverse square root is a well-known algorithm used to quickly approximate $( \frac{1}{\sqrt{x}} )$, most famously implemented in the 1999 video game Quake III Arena to efficiently compute lighting and graphics calculations such as vector normalization. It became famous because it produces a very good approximation using a clever bit-level hack on floating-point numbers combined with a single Newton–Raphson iteration, making it significantly faster than directly computing the square root and division on older hardware. The method works by reinterpreting the bits of a floating-point number as an integer, applying a specially chosen “magic constant” to get an initial estimate, and then refining the result. Although modern CPUs and GPUs now have fast hardware support for square roots, the algorithm remains an iconic example of low-level optimization and numerical ingenuity in computer graphics history. ARTICLE PAGE |