#include <Gamma.hh>
|
static short | Abs (short d) |
|
static int | Abs (int d) |
|
static long | Abs (long d) |
|
static float | Abs (float d) |
|
static double | Abs (double d) |
|
static double | LnGamma (double z) |
|
static double | Log (double x) |
|
static double | Exp (double x) |
|
Definition at line 46 of file Gamma.hh.
◆ MyGamma()
◆ ~MyGamma()
◆ Abs() [1/5]
static short MyGamma::Abs |
( |
short |
d | ) |
|
|
inlinestaticprivate |
Definition at line 62 of file Gamma.hh.
62 {
return (
d > 0) ?
d : -
d; }
◆ Abs() [2/5]
static int MyGamma::Abs |
( |
int |
d | ) |
|
|
inlinestaticprivate |
Definition at line 63 of file Gamma.hh.
63 {
return (
d > 0) ?
d : -
d; }
◆ Abs() [3/5]
static long MyGamma::Abs |
( |
long |
d | ) |
|
|
inlinestaticprivate |
Definition at line 64 of file Gamma.hh.
64 {
return (
d > 0) ?
d : -
d; }
◆ Abs() [4/5]
static float MyGamma::Abs |
( |
float |
d | ) |
|
|
inlinestaticprivate |
Definition at line 65 of file Gamma.hh.
65 {
return (
d > 0) ?
d : -
d; }
◆ Abs() [5/5]
static double MyGamma::Abs |
( |
double |
d | ) |
|
|
inlinestaticprivate |
Definition at line 66 of file Gamma.hh.
66 {
return (
d > 0) ?
d : -
d; }
◆ Exp()
static double MyGamma::Exp |
( |
double |
x | ) |
|
|
inlinestaticprivate |
Definition at line 69 of file Gamma.hh.
69 {
return std::exp(
x); }
◆ GamCf()
double MyGamma::GamCf |
( |
double |
a, |
|
|
double |
x |
|
) |
| |
|
private |
Definition at line 76 of file Gamma.cc.
88 double fpmin = 1.e-30;
90 if (
a <= 0 ||
x <= 0)
return 0;
98 for (
int i=1; i<=itmax; i++) {
99 an = double(-i)*(double(i)-
a);
102 if (
Abs(d) < fpmin) d = fpmin;
104 if (
Abs(c) < fpmin) c = fpmin;
108 if (
Abs(del-1) <
eps)
break;
static const G4double eps
static short Abs(short d)
static double Exp(double x)
static double Log(double x)
static double LnGamma(double z)
◆ Gamma() [1/2]
double MyGamma::Gamma |
( |
double |
z | ) |
|
Definition at line 42 of file Gamma.cc.
static double LnGamma(double z)
◆ Gamma() [2/2]
double MyGamma::Gamma |
( |
double |
a, |
|
|
double |
x |
|
) |
| |
Definition at line 60 of file Gamma.cc.
69 if (
a <= 0 ||
x <= 0)
return 0;
double GamCf(double a, double x)
double GamSer(double a, double x)
◆ GamSer()
double MyGamma::GamSer |
( |
double |
a, |
|
|
double |
x |
|
) |
| |
|
private |
Definition at line 116 of file Gamma.cc.
129 if (
a <= 0 ||
x <= 0)
return 0;
135 for (
int n=1;
n<=itmax;
n++) {
static const G4double eps
static short Abs(short d)
static double Exp(double x)
static double Log(double x)
static double LnGamma(double z)
◆ LnGamma()
double MyGamma::LnGamma |
( |
double |
z | ) |
|
|
staticprivate |
Definition at line 147 of file Gamma.cc.
163 double c[7] = { 2.5066282746310005, 76.18009172947146, -86.50532032941677
164 ,24.01409824083091, -1.231739572450155, 0.1208650973866179e-2
165 ,-0.5395239384953e-5};
170 tmp = (x+0.5)*
Log(tmp)-
tmp;
171 double ser = 1.000000000190015;
172 for (
int i=1; i<7; i++) {
176 double v = tmp+
Log(c[0]*ser/x);
static double Log(double x)
◆ Log()
static double MyGamma::Log |
( |
double |
x | ) |
|
|
inlinestaticprivate |
Definition at line 68 of file Gamma.hh.
68 {
return std::log(
x); }
The documentation for this class was generated from the following files: