Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

OK, enough hype. -- Larry Wall in the perl man page


devel / comp.lang.rexx / Possible bug in Regina with FOR repetitor 2**31 or greater

SubjectAuthor
* Possible bug in Regina with FOR repetitor 2**31 or greaterArthur T.
+- Re: Possible bug in Regina with FOR repetitor 2**31 or greaterAnonymous
+* Re: Possible bug in Regina with FOR repetitor 2**31 or greaterRony
|`* Re: Possible bug in Regina with FOR repetitor 2**31 or greaterRick McGuire
| +- Re: Possible bug in Regina with FOR repetitor 2**31 or greaterArthur T.
| `- Re: Possible bug in Regina with FOR repetitor 2**31 or greaterGlenn Knickerbocker
`* Re: Possible bug in Regina with FOR repetitor 2**31 or greaterDennis Lee Bieber
 `* Re: Possible bug in Regina with FOR repetitor 2**31 or greaterArthur T.
  `- Re: Possible bug in Regina with FOR repetitor 2**31 or greaterDennis Lee Bieber

1
Possible bug in Regina with FOR repetitor 2**31 or greater

<ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20&group=comp.lang.rexx#20

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr2.eu1.usenetexpress.com!nntp.speedium.network!feeder01!81.171.65.16.MISMATCH!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.iad.POSTED!not-for-mail
From: arthur@munged.invalid (Arthur T.)
Newsgroups: comp.lang.rexx
Subject: Possible bug in Regina with FOR repetitor 2**31 or greater
Message-ID: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 51
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Tue, 14 Sep 2021 03:34:41 UTC
Date: Mon, 13 Sep 2021 23:34:41 -0400
X-Received-Bytes: 2046
 by: Arthur T. - Tue, 14 Sep 2021 03:34 UTC

I plan to open a report of this problem, but I'm having difficulty
deciding on a pithy, meaningful title. Have you any suggestions?

Feel free to point out how I've misinterpreted something and that
this isn't an actual bug. That's happened to me before. I couldn't
find anything in the documentation suggesting this limit. Does it
fail for other people? Does it fail or work on other REXXes?

If you try it, you may see that the error message on 3.9.3 is even
weirder than on older versions. Regardless of level, notice the
difference between DO I = 1 FOR N and DO I = 1 TO N.

<code>
say 'digits() =' digits()
n = 2**31 /* a 10-digit number */
say format(n,,,0) length(n) '(' || n || ')'
do i = 1 for n
say "In first loop for" n
leave i
end

numeric digits 20
say 'digits() =' digits()
n = 2**31 - 1
say format(n,,,0) length(n) '(' || n || ')'
do i = 1 for n
say "In second loop for" n
leave i
end
n = 2**31
say format(n,,,0) length(n) '(' || n || ')'
do i = 1 to n
say "In third loop TO" n
leave i
end
/*
The following yields:
Error 26.3: Value of FOR expression in DO instruction must be zero
or a positive whole number; found "2147483648"
*/
do i = 1 for n
say "In fourth loop for" n
leave i
end

exit 0

</code>

--
Arthur T. - ar23hur "at" pobox "dot" com

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<4f0068fe5fa1833e0918451d10f21c46@remailer.paranoici.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=21&group=comp.lang.rexx#21

  copy link   Newsgroups: comp.lang.rexx
From: nobody@remailer.paranoici.org (Anonymous)
Comments: This message did not originate from the Sender address above.
It was remailed automatically by anonymizing remailer software.
Please report problems or inappropriate use to the
remailer administrator at <abuse@remailer.paranoici.org>.
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com>
Message-ID: <4f0068fe5fa1833e0918451d10f21c46@remailer.paranoici.org>
Date: Tue, 14 Sep 2021 11:59:39 +0200 (CEST)
Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!mail2news.mixmin.net!not-for-mail
Injection-Info: mail2news.mixmin.net; posting-host=mail2news.mixmin.net;
mail-complaints-to=abuse@mixmin.net
 by: Anonymous - Tue, 14 Sep 2021 09:59 UTC

> I plan to open a report of this problem, but I'm having difficulty
> deciding on a pithy, meaningful title. Have you any suggestions?

27 +++ do i = 1 for n
line 27: Invalid whole number
Error 26.3: Value of FOR expression in DO instruction must be zero or a
positive whole number; found "2147483648"

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<shqg80$1ovi$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22&group=comp.lang.rexx#22

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!aioe.org!XdYYuWx+L8GWHwfluar4EQ.user.46.165.242.75.POSTED!not-for-mail
From: rony.flatscher@wu-wien.ac.at (Rony)
Newsgroups: comp.lang.rexx
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
Date: Tue, 14 Sep 2021 17:48:16 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shqg80$1ovi$1@gioia.aioe.org>
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="58354"; posting-host="XdYYuWx+L8GWHwfluar4EQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Rony - Tue, 14 Sep 2021 15:48 UTC

By default Rexx uses nine digits for a number. A whole number therefore cannot be larger than
999999999, which 2**31 is, hence the error.

Here a rexxtry.rex session (using ooRexx but this would not matter for this case):

F:\work\svn\bsf4oorexx\trunk\bsf4oorexx.dev\source_java>rexxtry
REXX-ooRexx_5.0.0(MT)_32-bit 6.05 13 Aug 2021
rexxtry.rex lets you interactively try REXX statements.
Each string is executed when you hit Enter.
Enter 'call tell' for a description of the features.
Go on - try a few... Enter 'exit' to end.
say digits()
9 ........................................... rexxtry.rex on WindowsNT
say 2**32
4.2949673E+9
........................................... rexxtry.rex on WindowsNT
say 2**31
2.14748365E+9
........................................... rexxtry.rex on WindowsNT
numeric digits 10
........................................... rexxtry.rex on WindowsNT
say 2**31
2147483648
........................................... rexxtry.rex on WindowsNT
say 2**32
4294967296
........................................... rexxtry.rex on WindowsNT

As you see, once you use ten digits for a number, 2**31 and 2**32 qualify again as whole numbers.

HTH,

---rony

On 14.09.2021 05:34, Arthur T. wrote:
> I plan to open a report of this problem, but I'm having difficulty
> deciding on a pithy, meaningful title. Have you any suggestions?
>
> Feel free to point out how I've misinterpreted something and that
> this isn't an actual bug. That's happened to me before. I couldn't
> find anything in the documentation suggesting this limit. Does it
> fail for other people? Does it fail or work on other REXXes?
>
> If you try it, you may see that the error message on 3.9.3 is even
> weirder than on older versions. Regardless of level, notice the
> difference between DO I = 1 FOR N and DO I = 1 TO N.
>
> <code>
> say 'digits() =' digits()
> n = 2**31 /* a 10-digit number */
> say format(n,,,0) length(n) '(' || n || ')'
> do i = 1 for n
> say "In first loop for" n
> leave i
> end
>
> numeric digits 20
> say 'digits() =' digits()
> n = 2**31 - 1
> say format(n,,,0) length(n) '(' || n || ')'
> do i = 1 for n
> say "In second loop for" n
> leave i
> end
> n = 2**31
> say format(n,,,0) length(n) '(' || n || ')'
> do i = 1 to n
> say "In third loop TO" n
> leave i
> end
> /*
> The following yields:
> Error 26.3: Value of FOR expression in DO instruction must be zero
> or a positive whole number; found "2147483648"
> */
> do i = 1 for n
> say "In fourth loop for" n
> leave i
> end
>
> exit 0
>
> </code>
>

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<56dc90ab-4168-46f8-ba46-240ff749ddb8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=23&group=comp.lang.rexx#23

  copy link   Newsgroups: comp.lang.rexx
X-Received: by 2002:a05:620a:111b:: with SMTP id o27mr9967386qkk.76.1631709411819;
Wed, 15 Sep 2021 05:36:51 -0700 (PDT)
X-Received: by 2002:a05:6902:706:: with SMTP id k6mr5944131ybt.337.1631709411519;
Wed, 15 Sep 2021 05:36:51 -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.rexx
Date: Wed, 15 Sep 2021 05:36:51 -0700 (PDT)
In-Reply-To: <shqg80$1ovi$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=24.151.69.205; posting-account=gi3GZAoAAACIbgt-QdEIHlbWxwNtCjVA
NNTP-Posting-Host: 24.151.69.205
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com> <shqg80$1ovi$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <56dc90ab-4168-46f8-ba46-240ff749ddb8n@googlegroups.com>
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
From: object.rexx@gmail.com (Rick McGuire)
Injection-Date: Wed, 15 Sep 2021 12:36:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 93
 by: Rick McGuire - Wed, 15 Sep 2021 12:36 UTC

On Tuesday, September 14, 2021 at 11:48:18 AM UTC-4, Rony wrote:
> By default Rexx uses nine digits for a number. A whole number therefore cannot be larger than
> 999999999, which 2**31 is, hence the error.
>
> Here a rexxtry.rex session (using ooRexx but this would not matter for this case):
>
> F:\work\svn\bsf4oorexx\trunk\bsf4oorexx.dev\source_java>rexxtry
> REXX-ooRexx_5.0.0(MT)_32-bit 6.05 13 Aug 2021
> rexxtry.rex lets you interactively try REXX statements.
> Each string is executed when you hit Enter.
> Enter 'call tell' for a description of the features.
> Go on - try a few... Enter 'exit' to end.
> say digits()
> 9
> ........................................... rexxtry.rex on WindowsNT
> say 2**32
> 4.2949673E+9
> ........................................... rexxtry.rex on WindowsNT
> say 2**31
> 2.14748365E+9
> ........................................... rexxtry.rex on WindowsNT
> numeric digits 10
> ........................................... rexxtry.rex on WindowsNT
> say 2**31
> 2147483648
> ........................................... rexxtry.rex on WindowsNT
> say 2**32
> 4294967296
> ........................................... rexxtry.rex on WindowsNT
>
> As you see, once you use ten digits for a number, 2**31 and 2**32 qualify again as whole numbers.
>
> HTH,
>
> ---rony
> On 14.09.2021 05:34, Arthur T. wrote:
> > I plan to open a report of this problem, but I'm having difficulty
> > deciding on a pithy, meaningful title. Have you any suggestions?
> >
> > Feel free to point out how I've misinterpreted something and that
> > this isn't an actual bug. That's happened to me before. I couldn't
> > find anything in the documentation suggesting this limit. Does it
> > fail for other people? Does it fail or work on other REXXes?
> >
> > If you try it, you may see that the error message on 3.9.3 is even
> > weirder than on older versions. Regardless of level, notice the
> > difference between DO I = 1 FOR N and DO I = 1 TO N.
> >
> > <code>
> > say 'digits() =' digits()
> > n = 2**31 /* a 10-digit number */
> > say format(n,,,0) length(n) '(' || n || ')'
> > do i = 1 for n
> > say "In first loop for" n
> > leave i
> > end
> >
> > numeric digits 20
> > say 'digits() =' digits()
> > n = 2**31 - 1
> > say format(n,,,0) length(n) '(' || n || ')'
> > do i = 1 for n
> > say "In second loop for" n
> > leave i
> > end
> > n = 2**31
> > say format(n,,,0) length(n) '(' || n || ')'
> > do i = 1 to n
> > say "In third loop TO" n
> > leave i
> > end
> > /*
> > The following yields:
> > Error 26.3: Value of FOR expression in DO instruction must be zero
> > or a positive whole number; found "2147483648"
> > */
> > do i = 1 for n
> > say "In fourth loop for" n
> > leave i
> > end
> >
> > exit 0
> >
> > </code>
> >
Even with a higher digits setting, this value is rejected for the FOR argument. This falls into the category of "numbers used directly by REXX" described on page 137 of The REXX Language, second edition. The exprf expression is one of the examples explicitly listed.

Rick

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<mnb4kgpjm6gn62lmhpabi2pqj9mqajkvmd@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=24&group=comp.lang.rexx#24

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 15 Sep 2021 13:26:16 -0500
From: wlfraed@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.rexx
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
Date: Wed, 15 Sep 2021 14:26:17 -0400
Organization: IISS Elusive Unicorn
Message-ID: <mnb4kgpjm6gn62lmhpabi2pqj9mqajkvmd@4ax.com>
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com>
User-Agent: ForteAgent/8.00.32.1272
X-No-Archive: yes
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 136
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-URQdSVXQuJI7X6C4+y69pqLE3GQpHqGzWL9Y+UWCwSMVSiI3FZkxZux0+Je3ON6gI0OTmArKWki8C/3!XU4Z7ojJNeRxxRvT+MILZbUWjJoH+DX/tlhrWTLmOb74Kni/NWDHmNslE/4UoVGSrmnkxGR4
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 4930
 by: Dennis Lee Bieber - Wed, 15 Sep 2021 18:26 UTC

On Mon, 13 Sep 2021 23:34:41 -0400, Arthur T. <arthur@munged.invalid>
declaimed the following:

>Feel free to point out how I've misinterpreted something and that
>this isn't an actual bug. That's happened to me before. I couldn't
>find anything in the documentation suggesting this limit. Does it
>fail for other people? Does it fail or work on other REXXes?
>
>If you try it, you may see that the error message on 3.9.3 is even
>weirder than on older versions. Regardless of level, notice the
>difference between DO I = 1 FOR N and DO I = 1 TO N.
>

> <code>
> say 'digits() =' digits()
> n = 2**31 /* a 10-digit number */
> say format(n,,,0) length(n) '(' || n || ')'
> do i = 1 for n
> say "In first loop for" n
> leave i
> end
>

Regina reference manual (3.9.1 manual, haven't seen a newer one) page
37 "Loop Convergence" might have a part to play. Not sure. You might have
to let the loop run to completion to find out. Might also depend upon how
Regina really implements "for n" termination. I'd probably write the
interpreter to convert to a "to n+start" internally -- and if the statement
already included a "to m" clause, keep the lowest termination.

> numeric digits 20

If the other responder is correct, Regina (and REXX implementations in
general) may ignore this for loop boundaries. So the above documented
convergence may come into play. There is also the consideration of whether
an implementation is using native integer arithmetic for loop indices
(would be fastest, and justify restriction to 32-bit integers).

-=-=-=-
/* REXX */
say "What!"

say 'digits() =' digits()
n = 2**31 /* a 10-digit number */
say "n" n
say "n+1" n+1
do i = 1 for n
say "In first loop for" n
leave i
end

numeric digits 20
say
say 'digits() =' digits()
n = 2**31 - 1
say "n" n
/*say "n+1" n+1*/
do i = 1 for n
say "In second loop for" n
leave i
end

say
n = 2**31
say "n" n
say "No increment for termination needed with a TO"
do i = 1 to n
say "In third loop TO" n
leave i
end

say
say "n" n
/* say "n+1" n+1 */
do i = 1 for n
say "In fourth loop for" n
leave i
end
-=-=-=-

Hmmm... Now this is interesting... Before adding the additional "say
'n+1'..." lines, I achieved

C:\Users\Wulfraed>regina t.rx
What!
digits() = 9
n 2.14748364E+9
In first loop for 2.14748364E+9

digits() = 20
n 2147483647
In second loop for 2147483647

n 2147483648
In third loop TO 2147483648

n 2147483648
32 +++ do i = 1 for n
Error 26 running "C:\Users\Wulfraed\t.rx", line 32: Invalid whole number
Error 26.3: Value of FOR expression in DO instruction must be zero or a
positive whole number; found "2147483648"

But after the additions that changed to...

C:\Users\Wulfraed>regina t.rx
What!
digits() = 9
n 2.14748364E+9
n+1 2.14748364E+9
In first loop for 2.14748364E+9

digits() = 20
n 2147483647
n+1 2147483648
In second loop for 2147483647

n 2147483648
No increment for termination needed with a TO
In third loop TO 2147483648

n 2147483648
n+1 2147483649 <***********************************
36 +++ do i = 1 for n
Error 26 running "C:\Users\Wulfraed\t.rx", line 36: Invalid whole number
Error 26.3: Value of FOR expression in DO instruction must be zero or a
positive whole number; found "21474836484799" <*************

WHICH definitely looks like an error somewhere in the conversion! (I
removed those statements, and the output went back to 2147483648)... Either
"n + 1" with digits 20 causes the error, the one with digits 9 does not. A
problem in the extended math modes?

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<np84kgtgfsmdhg2d891bami7nfs0u8e2nh@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=25&group=comp.lang.rexx#25

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx41.iad.POSTED!not-for-mail
From: arthur@munged.invalid (Arthur T.)
Newsgroups: comp.lang.rexx
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
Message-ID: <np84kgtgfsmdhg2d891bami7nfs0u8e2nh@4ax.com>
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com> <shqg80$1ovi$1@gioia.aioe.org> <56dc90ab-4168-46f8-ba46-240ff749ddb8n@googlegroups.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 19
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 15 Sep 2021 19:59:30 UTC
Date: Wed, 15 Sep 2021 15:59:31 -0400
X-Received-Bytes: 1635
 by: Arthur T. - Wed, 15 Sep 2021 19:59 UTC

In
Message-ID:<56dc90ab-4168-46f8-ba46-240ff749ddb8n@googlegroups.com>,
Rick McGuire <object.rexx@gmail.com> wrote:

>Even with a higher digits setting, this value is rejected for the FOR argument. This falls into the category of "numbers used directly by REXX" described on page 137 of The REXX Language, second edition. The exprf expression is one of the examples explicitly listed.

Thank you!

I'm glad I asked here before opening a problem. And, yes, TRL2 says
that exprf (FOR operand) can be limited, but doesn't put exprt (TO
operand) in the same category. And that exactly matches the results
of my test code.

WAD even if some of us didn't realize it. I hate to think that I may
have to actually read (or at least skim through) TRL2, but this shows
why I should (have).

--
Arthur T. - ar23hur "at" pobox "dot" com

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<uhe5kglkphq6jkl6qa4jnsqpb90vp2s7ub@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=26&group=comp.lang.rexx#26

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!peer02.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
From: arthur@munged.invalid (Arthur T.)
Newsgroups: comp.lang.rexx
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
Message-ID: <uhe5kglkphq6jkl6qa4jnsqpb90vp2s7ub@4ax.com>
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com> <mnb4kgpjm6gn62lmhpabi2pqj9mqajkvmd@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
X-No-Archive: yes
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 45
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 16 Sep 2021 03:37:48 UTC
Date: Wed, 15 Sep 2021 23:37:48 -0400
X-Received-Bytes: 2598
 by: Arthur T. - Thu, 16 Sep 2021 03:37 UTC

In Message-ID:<mnb4kgpjm6gn62lmhpabi2pqj9mqajkvmd@4ax.com>,
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:

>On Mon, 13 Sep 2021 23:34:41 -0400, Arthur T. <arthur@munged.invalid>
>declaimed the following:
>
>> <code>
>> say 'digits() =' digits()
>> n = 2**31 /* a 10-digit number */
>> say format(n,,,0) length(n) '(' || n || ')'
>> do i = 1 for n
>> say "In first loop for" n
>> leave i
>> end
>>
>
> Regina reference manual (3.9.1 manual, haven't seen a newer one) page
>37 "Loop Convergence" might have a part to play. Not sure. You might have
>to let the loop run to completion to find out. Might also depend upon how
>Regina really implements "for n" termination. I'd probably write the
>interpreter to convert to a "to n+start" internally -- and if the statement
>already included a "to m" clause, keep the lowest termination.

That convergence is probably (somehow) why this didn't cause an error
with the default 9-digits of accuracy. And Rick McGuire explained
why, with 20 digits it works with TO but not with FOR.

>Error 26 running "C:\Users\Wulfraed\t.rx", line 36: Invalid whole number
>Error 26.3: Value of FOR expression in DO instruction must be zero or a
>positive whole number; found "21474836484799" <*************
>
> WHICH definitely looks like an error somewhere in the conversion! (I
>removed those statements, and the output went back to 2147483648)... Either
>"n + 1" with digits 20 causes the error, the one with digits 9 does not. A
>problem in the extended math modes?

It's even weirder in Regina 3.9.3 because the error message from my
original example is:
Error 26.3: Value of FOR expression in DO instruction must be zero or
a positive whole number; found "2147483648 109"

--
Arthur T. - ar23hur "at" pobox "dot" com

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<adp6kgt4oea6mvtg1n33r0hq1r0vrbn0ts@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=27&group=comp.lang.rexx#27

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 16 Sep 2021 10:51:16 -0500
From: wlfraed@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.rexx
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
Date: Thu, 16 Sep 2021 11:51:16 -0400
Organization: IISS Elusive Unicorn
Message-ID: <adp6kgt4oea6mvtg1n33r0hq1r0vrbn0ts@4ax.com>
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com> <mnb4kgpjm6gn62lmhpabi2pqj9mqajkvmd@4ax.com> <uhe5kglkphq6jkl6qa4jnsqpb90vp2s7ub@4ax.com>
User-Agent: ForteAgent/8.00.32.1272
X-No-Archive: yes
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 26
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-gaijDQHjm8LmtDFsgCpKzdibxeRzyZ+tPLYtm7PWEys+nEtIVqAh5NyxtDqyqXd0GJEYay6T1RyjYdL!F03njBZFCzOPerSXWZ5487H4ZLp7ayYdNRCmte10tlEUYYKU4D8rkWB8txD83BDv7YLxJlV7
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1940
 by: Dennis Lee Bieber - Thu, 16 Sep 2021 15:51 UTC

On Wed, 15 Sep 2021 23:37:48 -0400, Arthur T. <arthur@munged.invalid>
declaimed the following:

>It's even weirder in Regina 3.9.3 because the error message from my
>original example is:
>Error 26.3: Value of FOR expression in DO instruction must be zero or
>a positive whole number; found "2147483648 109"

While I cited the 3.9.1 manual, I'm pretty certain I was running
3.9.3...

C:\Users\Wulfraed>rexx
parse version ver
say ver
^Z
REXX-Regina_3.9.3 5.00 5 Oct 2019

C:\Users\Wulfraed>

Hmmm, your expanded result looks like a garbage attempt at a 10^9 tail
<G>

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: Possible bug in Regina with FOR repetitor 2**31 or greater

<m0havg9abdp6qkp65ctpatbiqb7gssu7ko@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35&group=comp.lang.rexx#35

  copy link   Newsgroups: comp.lang.rexx
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: NotR@bestweb.net (Glenn Knickerbocker)
Newsgroups: comp.lang.rexx
Subject: Re: Possible bug in Regina with FOR repetitor 2**31 or greater
Date: Sat, 29 Jan 2022 12:56:52 -0500
Organization: strange kin, cent luck broker
Lines: 15
Message-ID: <m0havg9abdp6qkp65ctpatbiqb7gssu7ko@4ax.com>
References: <ui50kgpf0bg2rc3lhku3fln4eqn5hbjgkg@4ax.com> <shqg80$1ovi$1@gioia.aioe.org> <56dc90ab-4168-46f8-ba46-240ff749ddb8n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="9174587c3609c607440ec58a008dde66";
logging-data="12488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19INAMk2g7YcxMMirK05hf3"
Cancel-Lock: sha1:dGfGzrtpe1fSJATyGVhaDgbhw90=
X-Newsreader: Forte Agent 1.93/32.576 English (American)
 by: Glenn Knickerbocker - Sat, 29 Jan 2022 17:56 UTC

On Wed, 15 Sep 2021 05:36:51 -0700 (PDT), Rick McGuire wrote:
>> > Error 26.3: Value of FOR expression in DO instruction must be zero
>> > or a positive whole number; found "2147483648"
>Even with a higher digits setting, this value is rejected for the FOR
>argument. This falls into the category of "numbers used directly by
>REXX" described on page 137 of The REXX Language, second edition. The
>exprf expression is one of the examples explicitly listed.

This seems weird when a smaller value of DIGITS() causes smaller numbers
to be rejected, but I see it says that an implementation restriction
*may* apply, and that 9 is the *mininum* length that must be supported.
So Regina is actually supporting a little *more* than required here.
Trying it in ooRexx, I get this error starting right at 1E10.

¬R

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor