56 G4Exception(
"G4GaussLegendreQ::G4GaussLegendreQ()",
"InvalidCall",
60 temp1=0.0, temp2=0.0, temp3=0.0, temp=0.0 ;
67 newton0 = std::cos(
pi*(i - 0.25)/(k + 0.5)) ;
72 for(
G4int j=1;j<=k;j++)
76 temp1 = ((2.0*j - 1.0)*newton0*temp2 - (j - 1.0)*temp3)/j ;
78 temp = k*(newton0*temp1 - temp2)/(newton0*newton0 - 1.0) ;
80 newton0 = newton1 - temp1/temp ;
82 while(std::fabs(newton0 - newton1) > tolerance) ;
103 integral = 0.0, dx = 0.0 ;
109 return integral *= xDiff ;
126 static const G4double abscissa[] = { 0.148874338981631, 0.433395394129247,
127 0.679409568299024, 0.865063366688985,
128 0.973906528517172 } ;
130 static const G4double weight[] = { 0.295524224714753, 0.269266719309996,
131 0.219086362515982, 0.149451349150581,
132 0.066671344308688 } ;
135 integral = 0.0, dx = 0.0 ;
136 for(
G4int i=0;i<5;i++)
138 dx = xDiff*abscissa[i] ;
141 return integral *= xDiff ;
160 0.016276744849602969579, 0.048812985136049731112,
161 0.081297495464425558994, 0.113695850110665920911,
162 0.145973714654896941989, 0.178096882367618602759,
164 0.210031310460567203603, 0.241743156163840012328,
165 0.273198812591049141487, 0.304364944354496353024,
166 0.335208522892625422616, 0.365696861472313635031,
168 0.395797649828908603285, 0.425478988407300545365,
169 0.454709422167743008636, 0.483457973920596359768,
170 0.511694177154667673586, 0.539388108324357436227,
172 0.566510418561397168404, 0.593032364777572080684,
173 0.618925840125468570386, 0.644163403784967106798,
174 0.668718310043916153953, 0.692564536642171561344,
176 0.715676812348967626225, 0.738030643744400132851,
177 0.759602341176647498703, 0.780369043867433217604,
178 0.800308744139140817229, 0.819400310737931675539,
180 0.837623511228187121494, 0.854959033434601455463,
181 0.871388505909296502874, 0.886894517402420416057,
182 0.901460635315852341319, 0.915071423120898074206,
184 0.927712456722308690965, 0.939370339752755216932,
185 0.950032717784437635756, 0.959688291448742539300,
186 0.968326828463264212174, 0.975939174585136466453,
188 0.982517263563014677447, 0.988054126329623799481,
189 0.992543900323762624572, 0.995981842987209290650,
190 0.998364375863181677724, 0.999689503883230766828
195 0.032550614492363166242, 0.032516118713868835987,
196 0.032447163714064269364, 0.032343822568575928429,
197 0.032206204794030250669, 0.032034456231992663218,
199 0.031828758894411006535, 0.031589330770727168558,
200 0.031316425596862355813, 0.031010332586313837423,
201 0.030671376123669149014, 0.030299915420827593794,
203 0.029896344136328385984, 0.029461089958167905970,
204 0.028994614150555236543, 0.028497411065085385646,
205 0.027970007616848334440, 0.027412962726029242823,
207 0.026826866725591762198, 0.026212340735672413913,
208 0.025570036005349361499, 0.024900633222483610288,
209 0.024204841792364691282, 0.023483399085926219842,
211 0.022737069658329374001, 0.021966644438744349195,
212 0.021172939892191298988, 0.020356797154333324595,
213 0.019519081140145022410, 0.018660679627411467385,
215 0.017782502316045260838, 0.016885479864245172450,
216 0.015970562902562291381, 0.015038721026994938006,
217 0.014090941772314860916, 0.013128229566961572637,
219 0.012151604671088319635, 0.011162102099838498591,
220 0.010160770535008415758, 0.009148671230783386633,
221 0.008126876925698759217, 0.007096470791153865269,
223 0.006058545504235961683, 0.005014202742927517693,
224 0.003964554338444686674, 0.002910731817934946408,
225 0.001853960788946921732, 0.000796792065552012429
229 integral = 0.0, dx = 0.0 ;
230 for(
G4int i=0;i<48;i++)
232 dx = xDiff*abscissa[i] ;
235 return integral *= xDiff ;
G4double QuickIntegral(G4double a, G4double b) const
G4double Integral(G4double a, G4double b) const
G4GaussLegendreQ(function pFunction)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double AccurateIntegral(G4double a, G4double b) const