×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




 Would some one want to post sample code (RPG or CL) for the API CEERAN0?

 ---
Doug Hart


> -----Original Message-----
> From: midrange-l-admin@midrange.com
> [mailto:midrange-l-admin@midrange.com]On Behalf Of Vernon Hamberg
> Sent: Tuesday, September 17, 2002 8:45 AM
> To: midrange-l@midrange.com
> Subject: Re: ceerano and the seed
>
>
> Peter
>
> Would it make sense to treat a user-supplied seed the same way,
> since it is
> limited to a 4-byte signed integer?
>
> BTW, what does the expression "multiplicative congruential" mean?
> The first
> word is simple enough. Are all forms of this kind of generator essentially
> the same, just different constants? I've seen things on the net about
> 2^31-1 and 2^61-1 (or something like that)
>
> I seem to recall problems with skewed distributions when generating
> integers between 2 values. Does this "bucketizing" diminish the quality of
> the distribution? The random number generator actually returns values
> between 0 and 1.
>
> Thanks
>
> At 12:48 AM 9/17/02 -0400, you wrote:
> >Vernon,
> >
> >Yes, I am talking about the theory of generating pseudorandom numbers.
> >
> >I did a lot of work with these when I was doing Processing Plant
> Simulations
> >and Statistical Process Control a long time ago with General Foods.
> >
> >So, hopefully CEERAN0 uses GMT in the form HHMMSSTHT and then
> multiplies by
> >8 and adds 1 to get a large odd seed (since odd numbers have a chance of
> >being prime).
> >
> >Peter.
> >
> >----- Original Message -----
> >From: "Vernon Hamberg" <vhamberg@attbi.com>
> >To: <midrange-l@midrange.com>
> >Sent: Tuesday, September 17, 2002 12:05 AM
> >Subject: Re: ceerano and the seed
> >
> >
> > > Peter
> > >
> > > I'm not sure of the context. The usage instructions for
> CEERAN0 say that
> > > the seed should be a non-negative integer between 0 and 2,147,483,646.
> >Zero
> > > makes it generate its own seed from the GMT at the time the
> function is
> > > called. And it returns a value that can be used as the next seed. Of
> > > course, the new seed is generated by the original process,
> hence, as Leif
> > > says, it might not be that good an idea to use it. That was why I
> >suggested
> > > using 0, as that forces a somewhat unpredictable value for
> the seed each
> >time.
> > >
> > > Are you speaking of the theory of generating pseudorandom
> numbers, that
> > > uses a couple large relatively prime numbers? Am I anywhere
> close? I've
> > > never studied the theory that closely, I just want a function
> I can use
> > > that I can trust to generate even distributions.
> > >
> > > The rand() function in SQL can take a seed or not. Without a seed (a
> > > smallint or integer) it must generate its own seed, as it
> starts with a
> > > different sequence each time. If you use a seed, such as
> rand(100), the
> > > sequence of random floating point numbers is the same each time, as is
> > > expected. CEERAN0 has the same behavior
> > >
> > > Vern
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L)
> mailing list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.