ATLAS Offline Software
MathTools.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #define MathTools_cxx
7 
8 #include <cmath>
9 
10 double ln_factorial(unsigned int value) {
11  double result = 0.;
12  for (int k = value ; k > 0 ; --k) {
13  result += std::log(k);
14  }
15  return result;
16 }
17 
18 double ln_factorialApp(unsigned int value) {
19  return 0.5*std::log(1.04719755119659763+6.28318530717958623*value) + value*(std::log(value)-1.);
20 }
get_generator_info.result
result
Definition: get_generator_info.py:21
ln_factorial
double ln_factorial(unsigned int value)
Logarithmic factorial (precise).
Definition: MathTools.cxx:10
athena.value
value
Definition: athena.py:122
MathTools.h
ln_factorialApp
double ln_factorialApp(unsigned int value)
Logarithmic factorial (approximative).
Definition: MathTools.cxx:18
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
fitman.k
k
Definition: fitman.py:528