division
Larry Meadows
lfm at fpssun.fps.com
Tue Sep 20 05:33:07 AEST 1988
In article <650 at wsccs.UUCP>, val at wsccs.UUCP (Val Kartchner) writes:
>
> I have written some long integer math routines (ADD, SUB, MUL), but I
> need to know the most efficient way to divide. Assume that you have
> two character strings of arbitrary length.
I assume you want a non-binary integer division routine. Binary is easy, just
a shift & subtract. The best arbitrary precision division routine I have seen
is in D.E. Knuth, Seminumerical Algorithms (A.ofC.P. Vol 2). I'd give the
page # but don't have that volume here at "work".
--
Larry Meadows @ FPS ...!tektronix!fpssun!lfm
...!nosun!fpssun!lfm
More information about the Comp.lang.c
mailing list