List Commands Library for 50g

01292019, 12:16 AM
Post: #402




RE: List Commands Library for 50g
A quick method to avoid zero (and one which also gives problems) in a pseudo random number generator is to generate uniformly distributed integers over (0,M1) or (1,M) for some large (prime or power of two or whatever) integer. Then one computed for result X (0<=X<M) the number (2X+1)/2N as either a fraction or a floating point number.


« Next Oldest  Next Newest »

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