Xref: utzoo comp.lang.c++:2141 comp.lang.c:14413 comp.lang.forth:687 comp.lang.fortran:1554 comp.lang.misc:2226 comp.arch:7384
Path: utzoo!utgpu!watmath!clyde!att!rutgers!cs.utexas.edu!sm.unisys.com!ism780c!news
From: news@ism780c.isc.com (News system)
Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.forth,comp.lang.fortran,comp.lang.misc,comp.arch
Subject: Re: Assembly or ....
Message-ID: <19848@ism780c.isc.com>
Date: 30 Nov 88 04:28:08 GMT
References: <1388@aucs.UUCP| <729@convex.UUCP> <1961@crete.cs.glasgow.ac.uk> <949@taux01.UUCP> <1034@l.cc.purdue.edu>
Reply-To: marv@ism780.UUCP (Marvin Rubenstein)
Organization: Interactive Systems Corp., Santa Monica CA
Lines: 27

In article <1032@l.cc.purdue.edu> cik@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.