-2

Recently, I have been studying the code of berkeley-hardfloat(https://github.com/ucb-bar/berkeley-hardfloat/blob/master/src/main/scala/DivSqrtRecF64_mulAddZ31.scala). I have drawn the timing diagram of DivSqrtRecF64ToRaw_mulAddZ31, but I couldn't understand its algorithm especially how it works that the division is replaced by multiply and addition(line 439-711). Who can explain it in detail to me?

MK.Bin
  • 73
  • 6
  • 1
    Include all the necessary information **in the question**. Links may be supplemental information, but they are inadequate alone. Stack Overflow is intended to create a durable repository of questions and answers, and external links may change or vanish. So the information needs to be in the question. On top of that, you have not even linked to a specific source file. Nobody wants to go hunting through some project trying to find whatever you are asking about. – Eric Postpischil Jul 14 '19 at 11:14
  • Sorry, I have redirected the link to a concrete file. In fact, I just want to study a kind of high speed floating point division algorithm. Any useful algorithm will be OK, not necessarily this. – MK.Bin Jul 14 '19 at 14:36

1 Answers1

0

Look into sibling file DivSqrtRecFN_small.scala, it has formulas what is happening and it seems the method is identical in both.

For another method of high-speed division or square root, you can search, for example, for Goldschmidt division - it is implemented in AMD x86 CPUs.

Netch
  • 4,171
  • 1
  • 19
  • 31
  • Thank you for your answer. I have read the sibling file `DivSqrtRecFN_small.scala`, but I found that it calculated division by restoring algorithm rather than multiplication-addition algorithm. – MK.Bin Jul 15 '19 at 03:20