• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Random Numbers fasters than the osax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random Numbers fasters than the osax


  • Subject: Re: Random Numbers fasters than the osax
  • From: Emmanuel <email@hidden>
  • Date: Sun, 31 Mar 2002 09:08:43 +0200

At 1:21 AM +0200 30/3/02, Arthur J Knapp wrote:
>
> I would really appreciate it if someone could point me in the
>direction of some simple pseudo code for RNGs, (as opposed to
>platform-optimized implementations or complex mathematical theses).

I'm surely missing something, but what's wrong with the suggestion I
presented 3 days ago?

>------------------------
>set theNextRandomNumber to (thePreviousOne + BigBigPrime) mod (BigPrime)
>------------------------
>
>where BigPrime is any big prime number, and BigBigPrime a still bigger one.

(if you're looking for integer random numbers, then BigPrime must be
something like your range of values - not a prime number then)

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Random Numbers fasters than the osax (From: Arthur J Knapp <email@hidden>)

  • Prev by Date: Unicode
  • Next by Date: Re: Unicode
  • Previous by thread: Re: Random Numbers fasters than the osax
  • Next by thread: Re: Random Numbers fasters than the osax
  • Index(es):
    • Date
    • Thread