The fast inverse square root algorithm, famously used in Quake III Arena, computes 1/√x using bit manipulation and Newton's method. At its core is a "magic number" that initializes the approximation: ...
高速逆平方根(Fast Inverse Square Root)は、Quake IIIで有名になったビットレベルの近似法です。0x5f3759dfというマジックナンバーで初期値を作り、ニュートン法1回で良好な精度を得ます。本稿ではその仕組みと、現代CPUのrsqrt命令との使い分けを簡潔に整理します。
Abstract: The Fast Inverse Square Root algorithm has been used in 3D games of past for lighting and reflection calculations, because it offers up to four times performance gains. This paper presents a ...