Understanding Quake’s Fast Inverse Square Root(betterexplained.com)
betterexplained.com
Understanding Quake’s Fast Inverse Square Root
http://betterexplained.com/articles/understanding-quakes-fast-inverse-square-root
6 comments
And of course, they skip over the only part I don't understand about that hack. The real meat and potatoes, the magic number.
Heh, yeah. I believe Chris Lomonts paper talks about how it was derived (at least, he derives a new one, so I guess he must have figured it out - it went over my head though)
I always thought "inverse" square root was a misnomer. The actual inverse of the square root is the square.
This should either be called multiplicative inverse square root, or reciprocal square root, no?
This should either be called multiplicative inverse square root, or reciprocal square root, no?
In the case of the SSE instruction set, it is call reciprocal square root. I guess, when people say inverse, they often actually mean multiplicative inverse.
[deleted]
Pot meet kettle. ;)
http://news.ycombinator.com/item?id=419166
Or is this something intentional?
http://news.ycombinator.com/item?id=419166
Or is this something intentional?
Hah! I'm glad you replied so I can say thanks for your kind comment earlier.
Thank you.
And this is indeed something intentional. I continue to explore the community, as well as trying to provide value. I don't duplicate things unless I think there is genuine value, and this is (a) very old, (b) really cool, and (c) genuinely hacking.
Thanks for noticing. More details if you email me, but I've got a large backlog at the moment so won't reply immediately.
Thank you.
And this is indeed something intentional. I continue to explore the community, as well as trying to provide value. I don't duplicate things unless I think there is genuine value, and this is (a) very old, (b) really cool, and (c) genuinely hacking.
Thanks for noticing. More details if you email me, but I've got a large backlog at the moment so won't reply immediately.
How long is it before you can dupe something? A while back, I tried to submit a cool little list of bit hacks, only to find out that the exact same thing had been submitted years ago.
I guess many people probably know about it, but it's a pretty nice list of low level bit hacks:
http://graphics.stanford.edu/~seander/bithacks.html
I guess many people probably know about it, but it's a pretty nice list of low level bit hacks:
http://graphics.stanford.edu/~seander/bithacks.html
Not a dupe:
The other thread's url: betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/
This's url: betterexplained.com/articles/understanding-quakes-fast-inverse-square-root
One character as difference: the final slash.
The other thread's url: betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/
This's url: betterexplained.com/articles/understanding-quakes-fast-inverse-square-root
One character as difference: the final slash.
Good catch!
I guess no one can submit that list of bit hacks ever again, unless the dupe-catcher is changed or someone figures out a way to access it from an alternate URL (the site says we're not free to mirror it, even if we're free to use the hacks).
I guess no one can submit that list of bit hacks ever again, unless the dupe-catcher is changed or someone figures out a way to access it from an alternate URL (the site says we're not free to mirror it, even if we're free to use the hacks).
Maybe it'd still be seen as a dupe, but you could try http://graphics.stanford.edu/~seander/bithacks.html?dupe=1
Your welcome. Will do.
Unfortunately the magic number is still magic, even though I read the paper linked at the bottom. Can anyone summarize the reason that number works well?
I don't know how many people have showdead on, so I'll repeat the link from the dead comment for those who use the default setting, because it has a good answer:
https://secure.wikimedia.org/wikipedia/en/wiki/Fast_inverse_...
https://secure.wikimedia.org/wikipedia/en/wiki/Fast_inverse_...
Of course, this site is so much easier to understand than Chris' paper.
The history of this function (posted on Beyond3D[1]) is facinating too.
[1] Part 1: http://www.beyond3d.com/content/articles/8/ and part 2: http://www.beyond3d.com/content/articles/15/