Xref: utzoo comp.arch:10537 comp.lang.misc:3048 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!apple!sun-barr!newstop!texsun!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.arch,comp.lang.misc Subject: Re: Double Width Integer Multiplication and Division Message-ID: <4909@ficc.uu.net> Date: 7 Jul 89 15:02:24 GMT References: <57125@linus.UUCP> <1989Jun24.230056.27774@utzoo.uucp> <1388@l.cc.purdue.edu> Organization: Xenix Support, FICC Lines: 27 In article <1388@l.cc.purdue.edu>, cik@l.cc.purdue.edu (Herman Rubin) writes: > For example, on a machine in which there is division yielding a quotient > and a remainder, I want to write > q,r = x/y; (1) What does this do when no such operation exists? (2) How does this fit in with the rest of the expression syntax? (3) Get a good optimiser and say: q = x/y; r = x%y; (4) Is it obvious which is the quotient and which is the remainder when you have something like: tens,relx = muscle0.fiber/potential; (5) What if x or y contain other operations that could require a quotient or remainder? (6) What does this mean: q,r,s = x/y/z; (7) What does this sort of micro-optimisation gain you? Except in a tight loop, very little. Since you're intending to be machine- specific anyway, why not squirrel that loop away in an assembly routine? -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: peter@ficc.uu.net, +1 713 274 5180. | "WHAT HAPPENED TO ALL Personal: peter@sugar.hackercorp.com. `-_-' | THE WOMEN IN TEXAS?" Quote: Have you hugged your wolf today? 'U` | -- ACS1W@jane.uh.edu (meesh)