CLHEP 2.4.7.1
C++ Class Library for High Energy Physics
RandomEngine.icc
Go to the documentation of this file.
1// $Id: RandomEngine.icc,v 1.4 2010/10/25 18:18:47 garren Exp $
2// -*- C++ -*-
3//
4// -----------------------------------------------------------------------
5// HEP Random
6// --- HepRandomEngine ---
7// inlined functions implementation file
8// -----------------------------------------------------------------------
9// This file is part of Geant4 (simulation toolkit for HEP).
10
11// =======================================================================
12// Gabriele Cosmo - Created: 5th September 1995
13// - Added == and != operators: 19th November 1996
14// - Moved seeds table to HepRandom: 19th March 1998
15// =======================================================================
16
17#include <cmath>
18
19namespace CLHEP {
20
21inline bool HepRandomEngine::operator==(const HepRandomEngine& engine) {
22 return (this==&engine);
23}
24
25inline bool HepRandomEngine::operator!=(const HepRandomEngine& engine) {
26 return (this!=&engine);
27}
28
30 static const double exponent_bit_32 = std::pow(2.0, 32.0);
31 return exponent_bit_32;
32}
33
35 static const double mantissa_bit_12 = std::pow(0.5, 12.0);
36 return mantissa_bit_12;
37}
38
40 static const double mantissa_bit_24 = std::pow(0.5, 24.0);
41 return mantissa_bit_24;
42}
43
45 static const double twoToMinus_32 = std::ldexp(1.0, -32);
46 return twoToMinus_32;
47}
48
50 static const double twoToMinus_48 = std::ldexp(1.0, -48);
51 return twoToMinus_48;
52}
53
55 static const double twoToMinus_49 = std::ldexp(1.0, -49);
56 return twoToMinus_49;
57}
58
60 static const double twoToMinus_53 = std::ldexp(1.0, -53);
61 return twoToMinus_53;
62}
63
65 static const double nearlyTwoToMinus_54 = std::ldexp(1.0, -54)
66 - std::ldexp(1.0, -100);
68}
69
70} // namespace CLHEP
static double twoToMinus_48()
bool operator!=(const HepRandomEngine &engine)
static double twoToMinus_53()
static double mantissa_bit_24()
static double nearlyTwoToMinus_54()
bool operator==(const HepRandomEngine &engine)
static double mantissa_bit_12()
static double twoToMinus_49()
static double twoToMinus_32()
static double exponent_bit_32()