(double a, double x)
| 882 | return -x + lnX*a +log(sum); |
| 883 | } |
| 884 | @SuppressWarnings("unused") |
| 885 | private static double lnLowIncGamma1(double a, double x) |
| 886 | { |
| 887 | double inter = lowIncGamma.lentz(a,x); |
| 888 | if(inter <= 1e-16)//The result was ~0, in which case Gamma[a,z] ~= Gamma[a] |
| 889 | return lnGamma(a); |
| 890 | return a*log(x)-x-log(inter); |
| 891 | } |
| 892 | |
| 893 | private static final ContinuedFraction lowIncGamma = new ContinuedFraction() |
| 894 | { |