CPP_RANDOM
C++ Random Number Generator Routines {#cpp_random-c-random-number-generator-routines align="center"}
CPP_RANDOM is a directory of C++ programs which illustrate the use of the C++ random number generator routines.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
CPP_RANDOM is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
ASA183, a C++ library which implements a pseudorandom number generator, by Wichman and Hill. This is a C++ version of Applied Statistics Algorithm 183.
NORMAL, a C++ library which computes elements of a sequence of pseudorandom normally distributed values.
RAND48, a C++ program which demonstrates the use of the rand48 family of random number generators available in the C/C++ standard library.
RANDLC, a C++ library which generates a sequence of pseudorandom numbers, used by the NAS Benchmark programs.
RNGLIB, a C++ library which implements a random number generator (RNG) with splitting facilities, allowing multiple independent streams to be computed, by L'Ecuyer and Cote.
UNIFORM, a C++ library which computes elements of a uniform pseudorandom sequence.
VAN_DER_CORPUT, a C++ library which computes elements of a 1D van der Corput Quasi Monte Carlo (QMC) sequence using a simple interface.
- Paul Deitel, Harvey Deitel,
C++: How to Program,
Seventh Edition,
Prentice Hall, 2011,
ISBN: 978-013-216541-9,
LC: QA76.73.C153.D45. - Steve Oaulline,
Practical C++ Programming,
Second Edition,
O'Reilly, 2003,
ISBN: 1-56592-139-9,
LC: QA76.73.C15.O84. - Bjarne Stroustrup,
The C++ Programming Language,
Addison-Wesley, 2000,
ISBN: 0-201-70073-5,
LC: QA76.73.C153.S77.
DRAND48_TEST shows how to use the standard library routines SRAND48 to set the seed and DRAND48 to return random real numbers in [0,1].
- drand48_test.cpp, the source code;
- drand48_test_output.txt, the output file.
RAND_TEST shows how to use the standard library routines SRAND to set the seed and RAND to return random integers which can be scaled to real numbers in [0,1].
- rand_test.cpp, the source code;
- rand_test_output.txt, the output file.
RANDOM_TEST shows how to use the standard library routines SRANDOM to set the seed and RANDOM to return random integers which can be scaled to real numbers in [0,1].
- random_test.cpp, the source code;
- random_test_output.txt, the output file.
You can go up one level to the C++ source codes.
Last revised on 15 September 2012.