淘沙TV
算法和数据结构

快速平方根倒数:Quake III 的算法

原名:Fast Inverse Square Root — A Quake III Algorithm
这剩下的果实·YouTube 602.7 万次观看·B站 772 播放··20:08
在 B 站打开 原 YouTube 版本

关于这个视频

Quake III 快速平方根逆演练,解释常量 0x5f3759df 的来源。它涵盖了 IEEE 754 浮点数、近似对数的位 hack 以及牛顿法改进。

HN 为什么推荐它:HN 推荐它作为一种平易近人的解释,使著名的算法最终变得有意义。

“这个视频很平易近人并且解释得很好”— HN 评论 · 2021 · 原文

查看英文原文

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.

Why HN likes it: HN recommends it as an approachable explanation that makes the famous algorithm finally make sense.

“This video is approachable and explains it pretty well”

HN 提及 4 次推荐者 3 人首次 2021最近 2022质量分 3.5

原视频频道:Nemean · YouTube 602.7 万次观看

科普进阶常青地震三ieee 754浮点牛顿法位黑客