Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for 32 bit division routine in C

Status
Not open for further replies.

luben111

Advanced Member level 1
Joined
Mar 2, 2002
Messages
491
Helped
111
Reputation
223
Reaction score
107
Trophy points
1,323
Location
UK
Activity points
3,910
32 bit disvision

Hello,

Who can help me with some link or source code for 32 bit division routine , written on C.

I need to devide 32 bit digit on 16 bit digit number (the result is 16 bit digit). I found many routines, but on assembler.. can somebody help me with C routine?

Regards
Luben
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
637
Reputation
1,272
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
32 bit disvision

Why can't you use your compiler's division operator? Doesn't it have a 32 bit int or long or float or something?
 

luben111

Advanced Member level 1
Joined
Mar 2, 2002
Messages
491
Helped
111
Reputation
223
Reaction score
107
Trophy points
1,323
Location
UK
Activity points
3,910
Re: 32 bit disvision

Hello,

I would like to use the compiler 32 division routines of cource, but for my processor there is only one compiler that supports up to 16 bit variables.

And thank you for the link. Actually now I'm trying to implement and convert to my uP the 31by16by16 division

http://www.piclist.com/techref/microchip/math/div/index.htm

, but inside the routine there is a bug, so now I'm fixing it - the good thing for such routine is that it's extremely fast and RAM saving.


Regards
Luben
 

bhaskaran

Newbie level 6
Joined
Nov 27, 2004
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
91
Re: 32 bit disvision

veiw this example file, u can get the idea.

K.bhaskaran
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top