Re: 32-bit random numbers

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi igor,

"K * (rand(N) - 1) + rand(K) - 1"

It looks flat, but what is your intended advantage over
N*(rand(N)-1)+rand(N)-1, {N=#1000}
??

Notice you can also extend that one:

N*(rand(N)-1)+rand(N)-1

goes to:

N*N*(rand(N)-1)+N*(rand(N)-1)+rand(N)-1

if N is an integer multiple of the number of terms minus 1,
or:

N*N*(rand(N2)-1)+N*(rand(N2)-1)+rand(N2)-1

if N2=number of terms minus 1 .

This gives the ability to get higher and higher random numbers smile



Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu