CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
CLHEP::RandEngineBuilder< 32767 > Struct Reference

Static Public Member Functions

static unsigned int thirtyTwoRandomBits (long &seq)
 

Detailed Description

Definition at line 347 of file RandEngine.cc.

Member Function Documentation

◆ thirtyTwoRandomBits()

static unsigned int CLHEP::RandEngineBuilder< 32767 >::thirtyTwoRandomBits ( long &  seq)
inlinestatic

Definition at line 348 of file RandEngine.cc.

348 {
349 unsigned int x = rand() << 17; ++seq; // bits 31-17
350 x ^= rand() << 2; ++seq; // bits 16-2
351 x ^= ( (x>>23) ^ (x>>7) ) ^3; // bits 1-0 (weakly pseudo-random)
352 return x & 0xFFFFFFFF; // mask in case int is 64 bits
353 }

The documentation for this struct was generated from the following file: