by corsix · 2y ago · 0 comments
The related FRSQRTE instruction is much more conventional, operating on 32-bit floats, again giving approximate inverse square root.
https://en.m.wikipedia.org/wiki/Fast_inverse_square_root#Mot...
That article does say there’s an SSE instruction rsqrtss that is better.
See for example https://math.mit.edu/~stevenj/18.335/newton-sqrt.pdf
The initial guess is the approximate square root, but it needs to be halved as part of the calculation.