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.
The original expression is presumably an approximation to Q(a,1); as such it gave reasonable values when I checked a couple of cases.