Geek: fast inverse square root hack... This has long been one of my all-time favorite hacks, mainly because it looks so incredibly unlikely at first blush (a magic constant of 0x5f3759df? really?), but then turns out to have a solid reason why it works. I've read explanations before, but
none so clear as this one – and I love the generalization of it to other powers besides 0.5...
No comments:
Post a Comment