14#include "CLHEP/Random/Ranlux64Engine.h"
18 std::ofstream
output(
"testBug73093.cout");
24 for(
int il=0; il<100; ++il ) {
25 if(
sizeof(
long) > 4 ) {
27 seed = atol(
"9899876543210000");
28 mult = mult + atol(
"120034020050070");
31 mult = mult + 12003400;
40 output <<
"sizeof(long) = " <<
sizeof(long) << std::endl;
41 output <<
"Generating " << N <<
" random numbers with seed " << seed << std::endl;
42 output <<
"Using seed " << seed << std::endl;
45 for (
long i=0; i<N; ++i) {
46 double r = rng.
flat();
47 if( std::abs(r) > 1.0 ) ++bad;
52 output <<
"Sum: " << sum << std::endl;
53 output <<
"Average: " << sum / N << std::endl;
63 std::ofstream
output(
"testBug73093.seq");
68 for(
int il=0; il<50; ++il ) {
77 double __attribute__ ((unused)) sum = 0;
78 for (
long i=0; i<N; ++i) {
79 double r = rng.
flat();
80 if( std::abs(r) > 1.0 ) ++bad;
81 output <<
"[" << il <<
"][" << i <<
"] = " << r <<
";" << std::endl;
void setSeed(long seed, int lxr=1)
std::ofstream output("ranRestoreTest.cout")