This will be done in assembly code, using an integer multiply, 32 bit by 32 bit producing 64 bit result. Unsigned algorithm is good enough.(adsbygoogle = window.adsbygoogle || []).push({});

Generic algorithm to find 1 / D, eq is initial estimated quotient, from table, say with 8 bits of precision.

[tex] q_0\ =\ eq[/tex]

[tex] q_{n+1}\ =\ q_n\ (2\ -\ q_n\ X)[/tex]

For integer math, pre and post shifting of values will be done. Generally only 4 or 5 interations are required to get 32 bits of precision.

Are there better algorithms?

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Caculating 1/d if you have multiply

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Caculating multiply | Date |
---|---|

Multiplying Big Numbers Using FFT | Oct 17, 2017 |

Matrix Chain Multiplication: Optimal way of multiplying | Feb 26, 2017 |

Fortran Modern variable precision and integer multipliers | Mar 16, 2016 |

Multiplying small numbers and getting Inf | Nov 11, 2013 |

**Physics Forums - The Fusion of Science and Community**