Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and may be fixed. Will keep monitoring.


devel / comp.lang.forth / rosetta code : Modular arithmetic

SubjectAuthor
* rosetta code : Modular arithmeticnone
`- Re: rosetta code : Modular arithmeticHans Bezemer

1
rosetta code : Modular arithmetic

<nnd$01cb66ac$7fa50ed9@7c4507ce5afcbbfc>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17760&group=comp.lang.forth#17760

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: rosetta code : Modular arithmetic
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$01cb66ac$7fa50ed9@7c4507ce5afcbbfc>
Organization: KPN B.V.
Date: Wed, 27 Apr 2022 15:59:38 +0200
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.gegeweb.eu!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 13
Injection-Date: Wed, 27 Apr 2022 15:59:38 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1038
 by: none - Wed, 27 Apr 2022 13:59 UTC

I have add a contribution to
http://rosettacode.org/wiki/Modular_arithmetic

The problem ask for operators that behave the same as
for normal numbers, a task where in Forth shines.

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: rosetta code : Modular arithmetic

<1bb266ca-f020-4c24-b0a7-7f64ee99a8b9n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17767&group=comp.lang.forth#17767

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:a18:b0:69f:97af:c06f with SMTP id i24-20020a05620a0a1800b0069f97afc06fmr3944221qka.561.1651148408656;
Thu, 28 Apr 2022 05:20:08 -0700 (PDT)
X-Received: by 2002:ac8:5b15:0:b0:2f2:4529:bdd6 with SMTP id
m21-20020ac85b15000000b002f24529bdd6mr22571339qtw.353.1651148408439; Thu, 28
Apr 2022 05:20:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 28 Apr 2022 05:20:08 -0700 (PDT)
In-Reply-To: <nnd$01cb66ac$7fa50ed9@7c4507ce5afcbbfc>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <nnd$01cb66ac$7fa50ed9@7c4507ce5afcbbfc>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1bb266ca-f020-4c24-b0a7-7f64ee99a8b9n@googlegroups.com>
Subject: Re: rosetta code : Modular arithmetic
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Thu, 28 Apr 2022 12:20:08 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Hans Bezemer - Thu, 28 Apr 2022 12:20 UTC

On Wednesday, April 27, 2022 at 3:59:42 PM UTC+2, none albert wrote:
> I have add a contribution to
> http://rosettacode.org/wiki/Modular_arithmetic

First, thanks for participating in Rosetta Code - I think it's an important platform
and I've made several entries myself.

The fun part when porting it to 4tH:
- 4tH has "1 CONSTANT TRUE" - instead of all bits set. So a bit of fixing was required
in order to get it to run;
- norm-m starts with a "DUP 0<". Now for 4tH I have to negate that value in order to
get it to work. And then it became the sequence for "S>D". So I tested it on Gforth
and that worked ;-)
- Having said that: the sequence you chose better reflects your intention, of course.
But I thought it was a nice hack.

Hans Bezemer

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor