RandomEngine.icc

Go to the documentation of this file.
00001 // $Id:$
00002 // -*- C++ -*-
00003 // 
00004 // -----------------------------------------------------------------------
00005 //                             HEP Random
00006 //                       --- HepRandomEngine ---
00007 //                 inlined functions implementation file
00008 // -----------------------------------------------------------------------
00009 // This file is part of Geant4 (simulation toolkit for HEP).
00010 
00011 // =======================================================================
00012 // Gabriele Cosmo - Created: 5th September 1995
00013 //                - Added == and != operators: 19th November 1996
00014 //                - Moved seeds table to HepRandom: 19th March 1998
00015 // =======================================================================
00016 
00017 #include <cmath>
00018 
00019 namespace CLHEP {
00020 
00021 inline bool HepRandomEngine::operator==(const HepRandomEngine& engine) {
00022   return (this==&engine);
00023 }
00024 
00025 inline bool HepRandomEngine::operator!=(const HepRandomEngine& engine) {
00026   return (this!=&engine);
00027 }
00028 
00029 inline double HepRandomEngine::exponent_bit_32()  {
00030   static double exponent_bit_32 = std::pow(2.0, 32.0);
00031   return exponent_bit_32;
00032 }
00033 
00034 inline double HepRandomEngine::mantissa_bit_12()  {
00035   static double mantissa_bit_12 = std::pow(0.5, 12.0);
00036   return mantissa_bit_12;
00037 }
00038 
00039 inline double HepRandomEngine::mantissa_bit_24()  {
00040   static double mantissa_bit_24 = std::pow(0.5, 24.0);
00041   return mantissa_bit_24;
00042 }
00043 
00044 inline double HepRandomEngine::twoToMinus_32()  {
00045   static double twoToMinus_32 = std::ldexp(1.0, -32);
00046   return twoToMinus_32;
00047 }
00048 
00049 inline double HepRandomEngine::twoToMinus_48()  {
00050   static double twoToMinus_48 = std::ldexp(1.0, -48);
00051   return twoToMinus_48;
00052 }
00053 
00054 inline double HepRandomEngine::twoToMinus_49()  {
00055   static double twoToMinus_49 = std::ldexp(1.0, -49);
00056   return twoToMinus_49;
00057 }
00058 
00059 inline double HepRandomEngine::twoToMinus_53()  {
00060   static double twoToMinus_53 = std::ldexp(1.0, -53);
00061   return twoToMinus_53;
00062 }
00063 
00064 inline double HepRandomEngine::nearlyTwoToMinus_54()  {
00065   static double nearlyTwoToMinus_54 = std::ldexp(1.0,  -54)
00066                                           - std::ldexp(1.0, -100);
00067   return nearlyTwoToMinus_54;
00068 }
00069 
00070 }  // namespace CLHEP

Generated on Mon May 27 17:50:33 2013 for Geant4 by  doxygen 1.4.7