I have checked my function with mathematica and it is returning very accurate answers for all your input.

]]>>>> igamc(2,1.6/2)

0.80879213541099948 0.9057

igamc(1,.596953/2)

0.74194771741659604 correct

igamc(4,.502193/2)

5.9991863583757725 0.261961

>>> igamc(1.5,4.882605/2)

0.16003494020523146 0.180598

or did i mess up the equation in my program?

def igamc(s,z):

return ((e**-z)*(z**(s-1))*(z*((s**2)-s*(2*z+9)+z*(z+11)+26)+6))/(-s**3 + 3*s**2*(z +3) - s*(3*z*(z+7)+26) + z*((z+6)**2)+24)

EDIT: it turns out that the values are more or less correct, but the reference paper has weird answers

]]>Actually it is very accurate for s >= 1 and z > 0. If you need values of 0< s <1 I can compute those.

]]>Try that. It is accurate for s >= 2 and z > 0.

]]>after editing the formula to

upper = 1 - lower_incomplete_gamma-> upper / gamma(a), im still getting the same correct values, but different wrong values.

I can dig up possibly some computer programs for the evaluation of continued fractions.

]]>>>> igamc(1.,2.13333/2)

0.34415436045553527 correct

>>> igamc(1.5,4.882605/2)

0.19091682276034516 off slightly

>>> igamc(1,.596953/2)

0.74194771741659593 correct

>>> igamc(1.5,.5)

0.65129687629720212 supposed correct answer is 0.801252, wolfram is giving me 0.710091

and i have not yet figured out how to do those continued fractions, so im afraid no luck there for the moment

]]>im downloading the book right now, but its taking a bit long (43mb)

thanks!

]]>Should be a dt on the end :

This numerator is an upper incomplete gamma function and you only have to look up how to evaluate it. The abramowitz stegun book might help.

There is a neat continued fraction:

]]>the function im working on is

There are numerous techniques, to be more specific I would have to see the integral.

Here is the caveat. If a black box integrator can't do the integral, whether it has an upper limit of infinity or not means that you are usually going to have to use math to clean the integral up. The term is called improving the geometry of the integrand.

There is a story about a certain air force whose pilots enjoyed a 10 to 1 kill ratio. When those pilots were upgraded to missiles, their kill ratio dropped down to 3 to 1. Why, they became dependent on missiles and had lost their basic dogfighting skills. Same thing here, as everyone grows dependent on the black box integrator, fewer and fewer people can now "improve the geometry." The trend is to plug it in to say Maple and forget about it. Worse, to blindly trust any answer any computer, anywhere spits out.

Here is an example that is easy to follow but yet illustrates the point. Now this integral is easy to do analytically and equals 2 / 3 = .6666666666. This is only to demonstrate a point. Incidentally this is called BM's integral, as part of an inside joke.

If we try to use simpsons rule on it we need 100 panels to get .66585. If we now transform the integral into:

Now using simpsons rule and 100 panels we get .666666666

This is a much better answer for the same amount of work.

Same thing for your question.

]]>