Advertisement

ASM (Preferably MMX) SQRT

Started by December 13, 2000 02:30 AM
0 comments, last by morfe 24 years, 1 month ago
The title says it all. I''m looking for assembler code, preferably using MMX optimisations (but not 3DNow!) that is a FAST SQRT function. Can anybody help? BTW, it doesn''t have to be exact, just very close.
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
I only know how to do square roots for floating point numbers in asm - however, assuming that you want to do dwords (words & qwords are also okay) , try something like this
  __asm {   fild    DWORD myVar   fsqrt   fistp   DWORD myResult}  

This topic is closed to new replies.

Advertisement