4 // -----------------------------------------------------------------------
6 // --- HepRandomEngine ---
7 // inlined functions implementation file
8 // -----------------------------------------------------------------------
9 // This file is part of Geant4 (simulation toolkit for HEP).
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 // =======================================================================
21 inline bool HepRandomEngine::operator==(const HepRandomEngine& engine) {
22 return (this==&engine);
25 inline bool HepRandomEngine::operator!=(const HepRandomEngine& engine) {
26 return (this!=&engine);
29 inline double HepRandomEngine::exponent_bit_32() {
30 static const double exponent_bit_32 = std::pow(2.0, 32.0);
31 return exponent_bit_32;
34 inline double HepRandomEngine::mantissa_bit_12() {
35 static const double mantissa_bit_12 = std::pow(0.5, 12.0);
36 return mantissa_bit_12;
39 inline double HepRandomEngine::mantissa_bit_24() {
40 static const double mantissa_bit_24 = std::pow(0.5, 24.0);
41 return mantissa_bit_24;
44 inline double HepRandomEngine::twoToMinus_32() {
45 static const double twoToMinus_32 = std::ldexp(1.0, -32);
49 inline double HepRandomEngine::twoToMinus_48() {
50 static const double twoToMinus_48 = std::ldexp(1.0, -48);
54 inline double HepRandomEngine::twoToMinus_49() {
55 static const double twoToMinus_49 = std::ldexp(1.0, -49);
59 inline double HepRandomEngine::twoToMinus_53() {
60 static const double twoToMinus_53 = std::ldexp(1.0, -53);
64 inline double HepRandomEngine::nearlyTwoToMinus_54() {
65 static const double nearlyTwoToMinus_54 = std::ldexp(1.0, -54)
66 - std::ldexp(1.0, -100);
67 return nearlyTwoToMinus_54;