🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.sources.bugs
Article #941

markov3, roll(n) patch

#941
From: jrb
Date: Fri, 20 Feb 1987 19:41
16 lines
1318 bytes
I had a couple of problems with the patches posted to net.sources for the
markov3.l program.  The patches stopped the core dumps but I found that the
bit-wise operations happening in the roll(n) function were causing WAY too
much duplication on the machine I am using (Tandy 6000, XENIX 3.01.02).  As
the roll(n) function is just supposed to return a random number between 0 and
n-1 I have applied the following fix using the % operator.  My markov3.l works
great if line 377 reads like:

	return(rand() % n);

This is a great program (although it's a memory piggy)... thanks!
-- 
Jon Boede				...!{ihnp4,akgua,gatech}!petro!jrb
512/599-1847				2555 N.E. Loop 410, #1403, 78217
	"People who are incapable of making decisions are
	 the ones who hit those barrels at freeway exits."
Technical Details
Message-ID: <132@petro.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!lll-lcc!seismo!ut-sally!im4u!swrinde!petro!jrb

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!lll-lcc!seismo!ut-sally!im4u!swrinde!petro!jrb
From: jrb@petro.UUCP
Newsgroups: net.sources.bugs
Subject: markov3, roll(n) patch
Message-ID: <132@petro.UUCP>
Date: Fri, 20-Feb-87 14:41:37 EST
Article-I.D.: petro.132
Posted: Fri Feb 20 14:41:37 1987
Date-Received: Sat, 21-Feb-87 17:39:05 EST
Sender: news@petro.UUCP
Organization: G.M. Andreen & Associates, Inc. San Antonio, Texas
Lines: 16
Keywords: markov3, random