Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2009-05-12 13:55:25

feiutm9898
Member
Registered: 2009-05-06
Posts: 4

Division Method: Reciprocal Multiplication

I would like to know if there is any method faster that Reciprocal Multiplication.

I know that we need to know the divisor in advance before proceeding Reciprocal Multiplication.

Please let me know.

Offline

#2 2009-05-12 20:42:43

Identity
Member
Registered: 2007-04-18
Posts: 934

Re: Division Method: Reciprocal Multiplication

What is Reciprocal Multiplication? Can you give an example?

Offline

#3 2009-05-12 21:58:03

feiutm9898
Member
Registered: 2009-05-06
Posts: 4

Re: Division Method: Reciprocal Multiplication

For example   a/b    a is integer, b is integer

a/b = a x 1/b  ,   we call this reciprocal multiplication.

Offline

#4 2009-05-13 02:31:40

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Division Method: Reciprocal Multiplication

Hi feiutm9898

  So you are trying to implement a division routine that doesn't use reciprocal mult. This used to be necessary because many early processors did not have a multiply or divide instruction. Years back, when we were writing our own CAS, we researched this particular problem. The Knuth books are the best place to begin. There might be something slightly faster, but we ended up using the recip. mult method with newtons iteration. It was very fast, but picking an initial value can be a pain (this problem can be solved too).

Last edited by bobbym (2009-05-13 02:34:58)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2009-05-13 13:56:50

feiutm9898
Member
Registered: 2009-05-06
Posts: 4

Re: Division Method: Reciprocal Multiplication

Dear bobbym,

Would you mind giving me a example that uses "recip. mult method with newtons iteration"?

For example, 20/4?

Offline

#6 2009-05-13 17:56:01

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Division Method: Reciprocal Multiplication

Hi feiutm9898;

  I might be able to recreate my rather naive method but this page contains everything I know about it plus a lot more.

http://en.wikipedia.org/wiki/Division_(digital)

Half way down the page you will see how newtons iteration creates a recurrence with quadratic convergence (fancy term - means roughly doubling the number of correct digits per iteration). They may have solved my problem of getting a good initial guess ( If I remember I would use the software divide instruction that  C++ provides to prime the recurrence). Newtons method is sensitive to the initial guess so you want to get close. Let me know how much of this you can use.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2009-05-13 19:06:57

feiutm9898
Member
Registered: 2009-05-06
Posts: 4

Re: Division Method: Reciprocal Multiplication

Hi,

Thanks for the information.

I found the explanation at http://www.docstoc.com/docs/2844296/ARM-System-Developers-Guide

This book is about embedded processor. Page 225 explains how 'Unsigned 32/32-bit Divide by Newton-Raphson" and it takes >36 cycles.

Offline

#8 2009-05-13 19:09:06

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Division Method: Reciprocal Multiplication

Hi feiutm9898;

  Thanks for providing me with that. Cool, an implementation in assembly,

Last edited by bobbym (2009-05-13 19:11:10)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2010-12-07 18:35:46

robinbolt
Member
Registered: 2010-12-07
Posts: 1

Re: Division Method: Reciprocal Multiplication

thnx for telling some thing new... i am a student and want to learn more and more...is there any method faster for division for big amounts???

Offline

#10 2010-12-07 18:58:32

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Division Method: Reciprocal Multiplication

Hi robinbolt;

Faster than these:

http://en.wikipedia.org/wiki/Division_(digital)

I do not know of any. Also you would have to work in multiprecision.

And welcome to the forum!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB