45{
47 const G4int maxNumber = 12;
49 G4double newton0 = 0.0, newton1 = 0.0, temp1 = 0.0, temp2 = 0.0, temp3 = 0.0,
50 temp = 0.0, cofi = 0.0;
51
55
57 {
58 if(i == 1)
59 {
60 newton0 = (1.0 +
alpha) * (3.0 + 0.92 * alpha) /
62 }
63 else if(i == 2)
64 {
65 newton0 += (15.0 + 6.25 *
alpha) / (1.0 + 0.9 * alpha + 2.5 *
fNumber);
66 }
67 else
68 {
69 cofi = i - 2;
70 newton0 += ((1.0 + 2.55 * cofi) / (1.9 * cofi) +
71 1.26 * cofi *
alpha / (1.0 + 3.5 * cofi)) *
73 }
74 for(k = 1; k <= maxNumber; ++k)
75 {
76 temp1 = 1.0;
77 temp2 = 0.0;
79 {
80 temp3 = temp2;
81 temp2 = temp1;
82 temp1 =
83 ((2 * j - 1 +
alpha - newton0) * temp2 - (j - 1 +
alpha) * temp3) / j;
84 }
86 newton1 = newton0;
87 newton0 = newton1 - temp1 / temp;
88 if(std::fabs(newton0 - newton1) <= tolerance)
89 {
90 break;
91 }
92 }
93 if(k > maxNumber)
94 {
95 G4Exception(
"G4GaussLaguerreQ::G4GaussLaguerreQ()",
"OutOfRange",
97 "Too many iterations in Gauss-Laguerre constructor");
98 }
99
104 }
105}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4VGaussianQuadrature(function pFunction)
G4double GammaLogarithm(G4double xx)