here's a neat explanation of a fast approximation to an inverse square root function found in the Quake 3 engine.
For everyone else it's a good insight into some of the mathematical methods used in Comp Sci.
(, Fri 5 Mar 2021, 19:31, Reply)
(, Fri 5 Mar 2021, 20:01, Reply)
(, Sat 6 Mar 2021, 0:02, Reply)
but if i've ever seen a bit of code that actually needs an insightful comment, it's that.
(, Sat 6 Mar 2021, 11:20, Reply)
But I'm confused about the meaning of a function called an "inverse square root".
(, Sat 6 Mar 2021, 13:35, Reply)
that's an inverse square root
(, Mon 8 Mar 2021, 5:47, Reply)
Though everybody thought I was a brilliant programmer in my day
(, Sat 6 Mar 2021, 19:37, Reply)
Even possibly detrimental in some contexts.
When it is needed though, like here, it's brilliant.
(, Sun 7 Mar 2021, 0:00, Reply)
The MD software GROMACS has a similar method but uses a look-up tables to provide the initial guess. This allows computation of 1/sqrt(r) to 32 bit accuracy with a single Newton iteration.
(, Mon 8 Mar 2021, 10:06, Reply)