Xref: utzoo comp.lang.c++:2143 comp.lang.c:14419 comp.lang.forth:689 comp.lang.fortran:1556 comp.lang.misc:2229 comp.arch:7387
Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!alverson
From: alverson@decwrl.dec.com (Robert Alverson)
Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.forth,comp.lang.fortran,comp.lang.misc,comp.arch
Subject: Re: Assembly or ....
Message-ID: <944@bacchus.dec.com>
Date: 30 Nov 88 19:10:11 GMT
References: <1388@aucs.UUCP| <729@convex.UUCP> <1961@crete.cs.glasgow.ac.uk> <949@taux01.UUCP> <1034@l.cc.purdue.edu> <8993@smoke.BRL.MIL> <1032@l.cc.purdue.edu> <21390@apple.Apple.COM> <7740@boring.cwi.nl>
Organization: DEC Western Research Lab
Lines: 11


In fact, the Intel 8087 almost computes

     i, r := a/b, a%b;

The floating point remainder function returns the reminader as the
function result, and the least 3 bits of the integer quotient are
stored in the condition codes.  For some typical uses of the
remainder function (range reduction), this is all you need.

Bob