#include <NumRecipes.h>
|
static double | gammln (double x) |
|
static double | gammq (double a, double x) |
|
static double | gammp (double a, double x) |
|
static void | gcf (double *gammcf, double a, double x, double *gln) |
|
static void | gser (double *gamser, double a, double x, double *gln) |
|
static double | gammln (double x) |
|
static double | gammq (double a, double x) |
|
static double | gammp (double a, double x) |
|
static void | gcf (double *gammcf, double a, double x, double *gln) |
|
static void | gser (double *gamser, double a, double x, double *gln) |
|
◆ gammln() [1/2]
double NumRecipes::gammln |
( |
double | x | ) |
|
|
static |
◆ gammln() [2/2]
static double NumRecipes::gammln |
( |
double | x | ) |
|
|
static |
◆ gammp() [1/2]
double NumRecipes::gammp |
( |
double | a, |
|
|
double | x ) |
|
static |
Definition at line 57 of file NumRecipes.cxx.
58{
59 double gamser,gammcf,gln;
60
61 if (x < 0.0 || a <= 0.0) std::cout<<
"ErrMsg(error)" <<
" Invalid arguments in routine gammp x=" <<
x <<
" a=" << a << endl;
62 if (x < (a+1.0)) {
63 gser(&gamser,a,x,&gln);
64 return gamser;
65 } else {
66 gcf(&gammcf,a,x,&gln);
67 return 1.0-gammcf;
68 }
69}
static void gser(double *gamser, double a, double x, double *gln)
static void gcf(double *gammcf, double a, double x, double *gln)
◆ gammp() [2/2]
static double NumRecipes::gammp |
( |
double | a, |
|
|
double | x ) |
|
static |
◆ gammq() [1/2]
double NumRecipes::gammq |
( |
double | a, |
|
|
double | x ) |
|
static |
Definition at line 72 of file NumRecipes.cxx.
73{
74 double gamser,gammcf,gln;
75
76 if (x < 0.0 || a <= 0.0) recipesErr(" Invalid arguments in routine GAMMQ");
77 if (x < (a+1.0)) {
78 gser(&gamser,a,x,&gln);
79 return 1.0-gamser;
80 } else {
81 gcf(&gammcf,a,x,&gln);
82 return gammcf;
83 }
84}
Referenced by ChisqConsistency::ChisqConsistency().
◆ gammq() [2/2]
static double NumRecipes::gammq |
( |
double | a, |
|
|
double | x ) |
|
static |
◆ gcf() [1/2]
void NumRecipes::gcf |
( |
double * | gammcf, |
|
|
double | a, |
|
|
double | x, |
|
|
double * | gln ) |
|
static |
Definition at line 86 of file NumRecipes.cxx.
87 {
89 double gold=0.0,g,fac=1.0,b1=1.0;
90 double b0=0.0,anf,ana,an,a1,
a0=1.0;
91
96 ana=an-a;
98 b0=(b1+b0*ana)*fac;
99 anf=an*fac;
102 if (a1) {
103 fac=1.0/a1;
104 g=b1*fac;
106 *gammcf=
exp(-x+a*log(x)-(*gln))*g;
107 return;
108 }
109 gold=g;
110 }
111 }
112 recipesErr(" a too large, NUMREC_ITMAX too small in routine GCF");
113 }
character *LEPTONflag integer iresonances real zeta5 real a0
EvtComplex exp(const EvtComplex &c)
static double gammln(double x)
Referenced by gammp(), and gammq().
◆ gcf() [2/2]
static void NumRecipes::gcf |
( |
double * | gammcf, |
|
|
double | a, |
|
|
double | x, |
|
|
double * | gln ) |
|
static |
◆ gser() [1/2]
void NumRecipes::gser |
( |
double * | gamser, |
|
|
double | a, |
|
|
double | x, |
|
|
double * | gln ) |
|
static |
Definition at line 115 of file NumRecipes.cxx.
116{
118 double sum,del,ap;
119
121 if (x <= 0.0) {
122 if (x < 0.0) recipesErr(" x less than 0 in routine GSER");
123 *gamser=0.0;
124 return;
125 } else {
126 ap=a;
127 del=sum=1.0/a;
129 ap += 1.0;
131 sum += del;
133 *gamser=sum*
exp(-x+a*log(x)-(*gln));
134 return;
135 }
136 }
137 recipesErr(" a too large, NUMREC_ITMAX too small in routine GSER");
138 return;
139 }
140}
Referenced by gammp(), and gammq().
◆ gser() [2/2]
static void NumRecipes::gser |
( |
double * | gamser, |
|
|
double | a, |
|
|
double | x, |
|
|
double * | gln ) |
|
static |
The documentation for this class was generated from the following files: