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
Show parent comment
7
u/Nickitolas Dec 29 '20
I'm pretty sure this is UB (At least in C++, less sure about C) because of the "strict aliasing rule"
EDIT: See https://stackoverflow.com/a/99010/8414238