Assembly or ....
News system
news at ism780c.isc.com
Wed Nov 30 14:28:08 AEST 1988
In article <1032 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
...
> suppose we want to
>divide a by b, obtaining an integer result i and a remainder c. I know
>of no machine with this instruction, and this is not that unusual an
>instruction to demand. It is cheap in hardware, and extremely expensive
>in software--at least 4 instructions.
Then he clarifies:
>I do not know if I made it clear in my initial posting, but the problem
>arises if the types of a, b, and c are floating. Not that the quote from
>my paper specifically has i an integer.
>--
>Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Ok here is one. Quoting from the IBM/709 Reference Manual (Circa 1959)
FDH - Floating Divide or Halt
THe c(ac) [means contents of ac register] are divided by c(y). The
quotent appears in the mq and the remainder appears in the ac. ...
I leave it to Herman to find out why more modern machines leave this out.
Hint: Try profiling your aplication to see what percent of the total process
time is used producing the remainder.
Marv Rubinstein.
More information about the Comp.lang.c
mailing list