(12C) Random Number (No Seed Needed)

12312017, 09:11 PM
(This post was last modified: 12312017 09:12 PM by Dieter.)
Post: #5




RE: (12C) Random Number (No Seed Needed)
(12312017 08:13 AM)Gamo Wrote: This Random Number Generator program used Pi and e^x to generate number between zero and one that no starting seed is necessary. I assume you want to say that it also works for seeds ≤ 0. Replace e^{x} with x² and you got one of the classic PRNGs for programmable calculators. (12312017 08:13 AM)Gamo Wrote: This sample Random Generator program generate 6 digits integers. It generates integers between 0 and 999998. (12312017 08:13 AM)Gamo Wrote: Here is the Random Generator portion between 0 to 1 with automatic random generator loop. ?!? – how do you test the statistical properties this way? (12312017 09:07 AM)Gamo Wrote: Very good idea by using the EEX If you got a random number r between 0 and 0,9999... you can easily transform it into a random integer between a and b (inclusive) by calculating int((b–a+1)*r) + a. So if you want an interval from 100000 to 999999 the transformation is int(900000*r)+100000, as grsbanks already noted. Dieter 

« Next Oldest  Next Newest »

Messages In This Thread 
(12C) Random Number (No Seed Needed)  Gamo  12312017, 08:13 AM
RE: (12C) Random Number (No Seed Needed)  grsbanks  12312017, 08:34 AM
RE: (12C) Random Number (No Seed Needed)  Gamo  12312017, 09:07 AM
RE: (12C) Random Number (No Seed Needed)  grsbanks  12312017, 10:10 AM
RE: (12C) Random Number (No Seed Needed)  Dieter  12312017 09:11 PM

User(s) browsing this thread: 1 Guest(s)