How to generate random 32bit integers

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

I have a need to generate random numbers in a range of 1 to n. N varies but may be as high as max 32 bit Uint.. 4,294,967,295.

I looks like I can do this with v 4.0 but unfortunately my app is in 3.1 and I'm not able to convert and test in the short term.

Speed is more important than distribution. It looks like the windows api may have a call for getting random numbers however there may be something better (easier/faster) coded in euphoria?

Thanks

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

Search



Quick Links

User menu

Not signed in.

Misc Menu