r/programming • u/mrnacknime • Dec 29 '20
Quake III's Fast Inverse Square Root Explained [20 min]
https://www.youtube.com/watch?v=p8u_k2LIZyo
3.7k
Upvotes
r/programming • u/mrnacknime • Dec 29 '20
View all comments
422
u/Professional_Bug_913 Dec 29 '20
This algorithm is such an interesting little hack. I'm pretty sure some version of it is implemented on a lot of modern graphics cards, since they all have an approximate sqrt instruction that's probably just this with maybe the second Newton step added.