Integer division, Reciprocal of an integer value, Kehrwert eines integers

#1725994
Lesenswert?

The attached algorithm in plein C calculates the reciprocal of a 16 Bit 
integer value. It is efficient and well suited for FPGA implementation. 
For details see comments in file. The implementation relates to
Beitrag "Division mittels Array umgehen - Problem: großer Zahlenbereich" .

Comments/remarks very welcome.

math rulez!

Cheers
Detlef
Angehängte Dateien:
#3052390
Lesenswert?

Here is another integer division implementation: unsigned 32 Bit divided 
by unsigned 16 Bit, result must fit in 16 Bit.

The routine is lightweight (90 Byte on PIC, quarter of the former 
routine) and trades space for time. It needs no multiplies and is as 
well suited for FPGA. The routine is no big deal, it mimics division in 
handwritten form for binary numbers.

Cheers
Detlef
Angehängte Dateien:

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren