ONE iteration Newton-Raphson reciprocal

HI ALL:
for better performance,
i want to revised the recirpocal function in reference source code(Vincent)
from 2 ietration to only one iteration without loss precision ,but i don’t know how to do this. does anyone know that?

HI ALL:

i have solve it, but i have another question, for x86 CPU, are there exist a count leading zero instruction?

Yap, take a look at the documentation for the BSR (bit-scan-reverse) assembler instruction. You’ll need to use your compiler’s inline assembler to generate the opcode. Alternatively, check if your compiler supports this as an intrinsic (GCC for example does).

cheers,
-wili

So how were you able to get the same precisicion with less iterations?

  • HM

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.