Seed in Random() BIF
Brought to you by:
rexx
The only qualification in the doc & TRL2 for seed is that it must be a whole number.
the following snippet demonstrates the problem ....
numeric digits 200
do i=25 to 100; s=2**i; say i
r=random(,,s)
end
the output follows .....
25
26
27
28
29
30
31
3 +++ r=random(,,s)
Error 40 running "C:\rand", line 3: Incorrect call to routine
Error 40.12: RANDOM argument 3 must be a whole number; found "2147483648"
I think the limit here is 999999999 (the platform limit for whole numbers)
Hi Walter,
thanks for your response
please note that 2**30 = 1,073,741,824 was acceptable
and this is greater than 999,999,999
cheers
felix
On Tue, Aug 11, 2015 at 6:12 AM, Walter walter-pachl@users.sf.net wrote:
Related
Bugs: #460
Interesting:
I use and am used to ooRexx
E:>rexx rat
1.07374182E+9
Error 40 running E:\rat.rex line 3: Incorrect call to routine
Error 40.12: RANDOM argument 3 must be a whole number; found
"1.07374182E+9"
E:>regina rat
1.07374182E+9
580
Nobody's perfect :)
Walter
Von: Felix Hofmann [mailto:aleph613@users.sf.net]
Gesendet: Mittwoch, 12. August 2015 09:55
An: [regina-rexx:bugs] 460@bugs.regina-rexx.p.re.sf.net
Betreff: [regina-rexx:bugs] Re: #460 Seed in Random() BIF
Hi Walter,
thanks for your response
please note that 2**30 = 1,073,741,824 was acceptable
and this is greater than 999,999,999
cheers
felix
On Tue, Aug 11, 2015 at 6:12 AM, Walter walter-pachl@users.sf.net
walter-pachl@users.sf.net wrote:
I think the limit here is 999999999 (the platform limit for whole numbers)
http://sourceforge.net/p/regina-rexx/bugs/460/ Seed in
Random() BIF*
Status: open
Group:
Created: Mon Jun 22, 2015 06:30 AM UTC by Felix Hofmann
Last Updated: Mon Jun 22, 2015 06:30 AM UTC
Owner: nobody
The only qualification in the doc & TRL2 for seed is that it must be a
whole number.
the following snippet demonstrates the problem ....
numeric digits 200
do i=25 to 100; s=2**i; say i
r=random(,,s)
end
the output follows .....
25
26
27
28
29
30
31
3 +++ r=random(,,s)
Error 40 running "C:\rand", line 3: Incorrect call to routine
Error 40.12: RANDOM argument 3 must be a whole number; found "2147483648"
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/regina-rexx/bugs/460/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
https://sourceforge.net/auth/subscript-disabledions/
[bugs:#460] http://sourceforge.net/p/regina-rexx/bugs/460/ Seed in
Random() BIF
Status: open
Group:
Created: Mon Jun 22, 2015 06:30 AM UTC by Felix Hofmann
Last Updated: Mon Aug 10, 2015 08:12 PM UTC
Owner: nobody
The only qualification in the doc & TRL2 for seed is that it must be a whole
number.
the following snippet demonstrates the problem ....
numeric digits 200
do i=25 to 100; s=2**i; say i
r=random(,,s)
end
the output follows .....
25
26
27
28
29
30
31
3 +++ r=random(,,s)
Error 40 running "C:\rand", line 3: Incorrect call to routine
Error 40.12: RANDOM argument 3 must be a whole number; found "2147483648"
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/regina-rexx/bugs/460/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
https://sourceforge.net/auth/subscript-disabledions/
Related
Bugs: #460
Interesting:
y=2**30
say y
say random(,,y)
ooRexx does what I expect:
E:>rexx rat
1.07374182E+9
3 - say random(,,y)
Error 40 running E:\rat.rex line 3: Incorrect call to routine
Error 40.12: RANDOM argument 3 must be a whole number; found "1.07374182E+9"
So does CMS:
rat
1.07374182E+9
4 +++ Say random(,,y)
DMSREX475E Error 40 running RAT EXEC, line 4: Incorrect call to routine
Hi Walter! The time is: Ready(20040); T=0.01/0.01 04:28:13
Regina does not (quite)
E:>regina rat
1.07374182E+9
580
Last edit: Walter 2015-08-12