home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!decwrl!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!math.zko.dec.com!edp
- From: edp@math.zko.dec.com (Eric Postpischil)
- Subject: Re: Greatest Common Denominator
- Message-ID: <1992Aug12.133510.1314@nntpd.lkg.dec.com>
- Sender: usenet@nntpd.lkg.dec.com (USENET News System)
- Reply-To: edp@math.zko.dec.com (Eric Postpischil)
- Organization: Digital Equipment Corporation
- References: <9208111504.AA04472@sicsoft.epfl.ch>
- Date: Wed, 12 Aug 1992 13:35:10 GMT
- Lines: 20
-
- In article <9208111504.AA04472@sicsoft.epfl.ch>, grand@sicsoft.epfl.CH
- ((grand)) writes:
-
- >Here is a little program which computes the greatest common denominator
- >of two numbers :
- >
- >\<< DO SWAP OVER MOD
- > UNTIL DUP NOT END
- > DROP ABS \>>
-
- Here is a littler program:
-
- << WHILE DUP2 REPEAT MOD SWAP END DROP2 >>
-
- (ABS at the end is optional.)
-
-
- -- edp (Eric Postpischil)
- "Always mount a scratch monkey."
- edp@alien.enet.dec.com
-