Re: Looking for software implementation of integer div, rem, mod

ddunfield@BIX.com (ddunfield on BIX)
Sun, 22 Oct 1995 12:05:51 GMT

          From comp.compilers

Related articles
Looking for software implementation of integer div, rem, mod lehotsky@mc.com (1995-10-12)
Re: Looking for software implementation of integer div, rem, mod ddunfield@BIX.com (1995-10-22)
Re: Looking for software implementation of integer div, rem, mod hbaker@netcom.com (1995-10-23)
| List of all articles for this month |

Newsgroups: comp.arch,comp.compilers,gnu.gcc.help
From: ddunfield@BIX.com (ddunfield on BIX)
Keywords: arithmetic, comment
Organization: Delphi Internet Services Corporation
References: 95-10-074
Date: Sun, 22 Oct 1995 12:05:51 GMT

lehotsky@mc.com (Alan Lehotsky) writes:


>I'm looking for a software implementation of 32/32 divide, with and
>without remainder and modulus.


>C code is preferred. An implementation that uses only
>shifts, adds (and/or multiplies) would be ideal. The chip I'm working
>with has no divide assists (except for single-precision float, where
>it has the ability to compute an inverse).


>I already checked the math software archives at netlib, et al.


Look for BIGNUM.ZIP, it's on my BBS (see below), and possibly on
SIMTEL, or connectn.acs.niu.edu /dunfield directory. It contains C
source showing how to do multi-byte arithmetic using only shifts,
adds and subtracts. Should be exactly what you are looking for.


----------------------------------------------------------------------
Dave Dunfield (ddunfield@bix.com) Embedded system development tools
Dunfield Development Systems Box 31044 Nepean Ontario Canada K2B 8S8
Tel: 613-256-5820 Fax: 613-256-5821 BBS(v32/v42/HST): 613-256-6289
[Archie didn't turn that up, but did find a bunch of bignum handling code
at ripem.msu.edu. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.