Random number generator

C

ciccio

Hi,

Maybe slightly off topic here, but what algorithm is used for the
implementation of rand() in <cstdlib> ?

Or if it is not standardized (which it should), does anybody know what
it is in g++?

Thanks
 
I

Ian Collins

ciccio said:
Hi,

Maybe slightly off topic here, but what algorithm is used for the
implementation of rand() in <cstdlib> ?
See section 7.20.2.2 of the standard for a portable implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top