Snippets tagged fast inverse square root; bitwise

  • Fast inverse square root

    This is an implementation of the famous 'magic number' method of rapidly calculating (inverse) square roots. (See http://en.wikipedia.org/wiki/Fast_inverse_square_root.) In practice, this version is no faster in F# than using 1./sqrt(x). I've posted it as an example of how you can get down-and-dirty with the bits in F# if you need to.

    7 people like this

    Posted: 12 years ago by Kit Eason