Import Geant4 10.5.0.beta source tree
This commit is contained in:
-4
@@ -31,10 +31,6 @@ void DoubConv::fill_byte_order () {
|
||||
z *= 256;
|
||||
}
|
||||
// x, in IEEE format, would now be 0x4330060504030201
|
||||
union DB8 {
|
||||
unsigned char b[8];
|
||||
double d;
|
||||
};
|
||||
DB8 xb;
|
||||
xb.d = x;
|
||||
int n;
|
||||
|
||||
+4
@@ -193,6 +193,10 @@ void DualRand::showStatus() const {
|
||||
std::cout.precision(pr);
|
||||
}
|
||||
|
||||
DualRand::operator double() {
|
||||
return flat();
|
||||
}
|
||||
|
||||
DualRand::operator float() {
|
||||
return (float) ( (integerCong ^ tausworthe) * twoToMinus_32()
|
||||
+ nearlyTwoToMinus_54() );
|
||||
|
||||
+8
@@ -268,6 +268,14 @@ void HepJamesRandom::flatArray(const int size, double* vect)
|
||||
}
|
||||
}
|
||||
|
||||
HepJamesRandom::operator double() {
|
||||
return flat();
|
||||
}
|
||||
|
||||
HepJamesRandom::operator float() {
|
||||
return float( flat() );
|
||||
}
|
||||
|
||||
HepJamesRandom::operator unsigned int() {
|
||||
return ((unsigned int)(flat() * exponent_bit_32()) & 0xffffffff ) |
|
||||
(((unsigned int)( u[i97] * exponent_bit_32())>>16) & 0xff);
|
||||
|
||||
+4
@@ -230,6 +230,10 @@ void MTwistEngine::showStatus() const
|
||||
std::cout << "----------------------------------------" << std::endl;
|
||||
}
|
||||
|
||||
MTwistEngine::operator double() {
|
||||
return flat();
|
||||
}
|
||||
|
||||
MTwistEngine::operator float() {
|
||||
unsigned int y;
|
||||
|
||||
|
||||
+10
@@ -338,6 +338,16 @@ void MixMaxRng::flatArray(const int size, double* vect )
|
||||
for (int i=0; i<size; ++i) { vect[i] = flat(); }
|
||||
}
|
||||
|
||||
MixMaxRng::operator double()
|
||||
{
|
||||
return flat();
|
||||
}
|
||||
|
||||
MixMaxRng::operator float()
|
||||
{
|
||||
return float( flat() );
|
||||
}
|
||||
|
||||
MixMaxRng::operator unsigned int()
|
||||
{
|
||||
return static_cast<unsigned int>(get_next());
|
||||
|
||||
+8
@@ -243,6 +243,14 @@ void RanecuEngine::flatArray(const int size, double* vect)
|
||||
table[index][1] = seed2;
|
||||
}
|
||||
|
||||
RanecuEngine::operator double() {
|
||||
return flat();
|
||||
}
|
||||
|
||||
RanecuEngine::operator float() {
|
||||
return float( flat() );
|
||||
}
|
||||
|
||||
RanecuEngine::operator unsigned int() {
|
||||
const int index = seq;
|
||||
long seed1 = table[index][0];
|
||||
|
||||
+3
-3
@@ -422,10 +422,10 @@ void Ranlux64Engine::setSeed(long seed, int lux) {
|
||||
}
|
||||
// are we on a 64bit machine?
|
||||
if( sizeof(long) >= 8 ) {
|
||||
long topbits1, topbits2;
|
||||
int64_t topbits1, topbits2;
|
||||
#ifdef WIN32
|
||||
topbits1 = ( seed >> 32) & 0xffff ;
|
||||
topbits2 = ( seed >> 48) & 0xffff ;
|
||||
topbits1 = ( (int64_t) seed >> 32) & 0xffff ;
|
||||
topbits2 = ( (int64_t) seed >> 48) & 0xffff ;
|
||||
#else
|
||||
topbits1 = detail::rshift<32>(seed) & 0xffff ;
|
||||
topbits2 = detail::rshift<48>(seed) & 0xffff ;
|
||||
|
||||
+8
@@ -411,6 +411,14 @@ void RanluxEngine::flatArray(const int size, double* vect)
|
||||
}
|
||||
}
|
||||
|
||||
RanluxEngine::operator double() {
|
||||
return flat();
|
||||
}
|
||||
|
||||
RanluxEngine::operator float() {
|
||||
return float( flat() );
|
||||
}
|
||||
|
||||
RanluxEngine::operator unsigned int() {
|
||||
return ((unsigned int)(flat() * exponent_bit_32()) & 0xffffffff) |
|
||||
(((unsigned int)(float_seed_table[i_lag]*exponent_bit_32())>>16) & 0xff);
|
||||
|
||||
+4
@@ -217,6 +217,10 @@ void RanshiEngine::showStatus() const {
|
||||
std::cout << "-------------------------------------------" << std::endl;
|
||||
}
|
||||
|
||||
RanshiEngine::operator double() {
|
||||
return flat();
|
||||
}
|
||||
|
||||
RanshiEngine::operator float() {
|
||||
unsigned int redAngle = (((numBuff/2) - 1) & redSpin) + halfBuff;
|
||||
unsigned int blkSpin = buffer[redAngle] & 0xffffffff;
|
||||
|
||||
Reference in New Issue
Block a user