integer division in ANSI C
Frank Adams
franka at mmintl.UUCP
Thu Mar 6 05:32:30 AEST 1986
In article <316 at hropus.UUCP> ka at hropus.UUCP (Kenneth Almquist) writes:
[Concerning proposed ANSI divide funtion]
>I would
>suggest making the routines simpler to use by providing separate
>routines for division and remainder, as this will encourage more people
>to use them when necessary. This would also mean that these routines
>could be replaced with simple macros on machines that do division the
>Fortran way (most of them).
>
>It would also be nice to have a modulo function. In my view, this
>would be more useful than a remainder function.
Let me second both of these notions, especially the first. It is relatively
rare to want both quotient and remainder. Having to go through the extra
effort of pulling out the one desired is probably enough to keep most C
programmers from using the function unless they are on a machine where
they need it.
Frank Adams ihnp4!philabs!pwa-b!mmintl!franka
Multimate International 52 Oakland Ave North E. Hartford, CT 06108
More information about the Comp.lang.c
mailing list