Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!news.dkrz.de!dscomsa.desy.de!news.belwue.de!news.uni-kl.de!rz.uni-karlsruhe.de!ka.sub.net!blackbush.xlink.net!tank.news.pipex.net!pipex!howland.erols.net!www.nntp.primenet.com!nntp.primenet.com!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: [Z-machine] Divison and modulo (was: JZIP/XZIP Patches)
Message-ID: <erkyrathDy9vG3.BFG@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <Pine.LNX.3.95.960920173018.5222G-100000@adamant.res.wpi.edu> <erkyrathDy1z30.MMD@netcom.com> <slrn548at1.ivk.mike@skaro.lawlib.wm.edu> <Pine.LNX.3.95.960922165609.1217A-100000@adamant.res.wpi.edu> <526n52$en@europa.frii.com> <erkyrathDy7w36.8t0@netcom.com> <erkyrathDy81rB.CsE@netcom.com>
Date: Wed, 25 Sep 1996 05:04:50 GMT
Lines: 23
Sender: erkyrath@netcom17.netcom.com

Andrew Plotkin (erkyrath@netcom.com) wrote:
> Ok, never mind. I got in, and according to the remarks and corrections on 
> GMD, everyone agrees that the opcodes are signed after all.

> Furthermore, the expression (a % b), with a and b signed numbers, does 
> not produce consistent results on all machines. 

> The more common option seems to be that (a % b) always has the same sign 
> as a. This would be a thing to standardize on, I guess? Comments?

(I should add that if a compiler uses this rule -- that (A % B) always 
has the same sign as A -- it will also follow the rule that (A / B) is 
rounded towards zero, not towards negative infinity.)

Does anyone want the doofy little Inform program I wrote to test signed 
multiplication, division, and modulo?

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
