Inverse Incomplete Gamma: Is equation 6.2.8 wrong?


ichbin
11-05-2010, 08:03 PM
Equation 6.2.8 of NR 3rd edition claims that P_a = P(a,1) = 0.253 a + 0.12 a^2 is a valid approximation for a < 1. But P(a,1) increases as a gets smaller, and this equation has it decreasing. I suspect what is meant is that P_a = P(a,1) = 1 - 0.253 a - 0.12 a^2. This is actually the expression that appears in the code.
The original expression is presumably an approximation to Q(a,1); as such it gave reasonable values when I checked a couple of cases.

Bill Press
11-05-2010, 08:49 PM
Yes, I think you are right. It is easy to check (e.g., by plotting it in Mathematica) that the RHS of 6.2.8 is a good approximation for Q(a,1), not P(a,1). As you point out, the code is correct. Thanks for noticing this.