Fast Inverse Square Root — A Quake III Algorithm
Nemean3 HN recommenders · recommended in 3 months, 2021-2022
6M views · 5 years ago · explainer · evergreen
A walkthrough of the Quake III fast inverse square root, explaining where the constant 0x5f3759df comes from. It covers IEEE 754 floats, the bit hack that approximates a logarithm, and a Newton's method refinement.
HN recommends it as an approachable explanation that makes the famous algorithm finally make sense.
26:41Finding the BEST sine function for Nintendo 64
Kaze Emanuar
418K views • 3 years ago
1:31:28Stanford Seminar: Beyond Floating Point: Next Generation Computer Arithmetic
Stanford Online
33K views • 9 years ago
1:00:17Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss”
CppCon
41K views • 7 years ago
1:34:42The Great Debate @ARITH23: John Gustafson and William Kahan
dancefan
4K views • 10 years ago
9:16Floating Point Numbers - Computerphile
Computerphile
2.5M views • 12 years ago
2:48TI DOOM
TPMFofMFF
199K views • 18 years ago
14:28Superpositions, Sudoku, the Wave Function Collapse algorithm.
Martin Donald
764K views • 6 years ago
18:20FIXING the ENTIRE SM64 Source Code (INSANE N64 performance)
Kaze Emanuar
3.2M views • 4 years ago
16:36Hacking at Quantum Speed with Shor's Algorithm | Infinite Series
PBS Infinite Series
238K views • 9 years ago
24:32How We Solved the Worst Minigame in Zelda's History
Linkus7
1.1M views • 6 years ago
26:33The Most Underrated Algorithm
Veritasium
10.8M views • 4 years ago
55:02GradIEEEnt half decent: The hidden power of imprecise lines
suckerpinch
391K views • 3 years ago
17:31How Quantum Computers Break Encryption | Shor's Algorithm Explained
minutephysics
3.4M views • 7 years ago
14:13Quake done Quick - Quake done Quickest
Quake done Quick
581K views • 16 years ago
44:1127c3: Console Hacking 2010 (en)
Christiaan008
33K views • 15 years ago
13:14Did Nintendo really forget to Optimize Super Mario 64 ? | MVG
Modern Vintage Gamer
1.3M views • 6 years ago
1:19:52CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
264K views • 10 years ago
5:58MarI/O - Machine Learning for Video Games
SethBling
11.5M views • 11 years ago
8:338088 MPH by Hornet + CRTC + DESiRE (final version)
andrewmjenner
93K views • 11 years ago
12:09How I Fixed a 10 Year Old Guitar Hero Bug Without the Source Code
ExileLord
404K views • 9 years ago
4 comments from Hacker News
print("Hello World") /s But I've heard good things about the Fast Inverse Square Root Calculation algorithm in the Doom 3 source code. ▶ this video
Apparently the bit pattern of a float interpreted as an int is sorta-kinda it's own logarithm, which is why the famous fast inverse square root from quake 3 works: log(x^-½) = -½log(x) =~ -log(x) >> 1. This video is approachable and explains it pretty well: ▶ this video
> The bits of a float as an integer literal are proportional to its log2 value (plus a constant), … I watched a video[0] a while back about that. Once that coincidence(?) was explained, Q_rsqrt finally made sense. [0]: ▶ this video (~20 minutes)
Very interesting that this was posted as I literally JUST watched an even MORE interesting youtube upload about this very bit of code just last weekend. Here's the very fun video if anyone wants to take a look: ▶ this video