#include "ReweightUtils/MathTools.h"
#include <cmath>
Go to the source code of this file.
|
| double | ln_factorial (unsigned int value) |
| | Logarithmic factorial (precise).
|
| double | ln_factorialApp (unsigned int value) |
| | Logarithmic factorial (approximative).
|
◆ MathTools_cxx
◆ ln_factorial()
| double ln_factorial |
( |
unsigned int | value | ) |
|
Logarithmic factorial (precise).
Definition at line 10 of file MathTools.cxx.
10 {
12 for (
int k = value ;
k > 0 ; --
k) {
14 }
16}
◆ ln_factorialApp()
| double ln_factorialApp |
( |
unsigned int | value | ) |
|
Logarithmic factorial (approximative).
Definition at line 18 of file MathTools.cxx.
18 {
19 return 0.5*std::log(1.04719755119659763+6.28318530717958623*value) +
value*(std::log(value)-1.);
20}