Geoscientific Model Development (Jul 2010)

Efficient approximation of the incomplete gamma function for use in cloud model applications

  • U. Blahak

DOI
https://doi.org/10.5194/gmd-3-329-2010
Journal volume & issue
Vol. 3, no. 2
pp. 329 – 336

Abstract

Read online

This paper describes an approximation to the lower incomplete gamma function &gamma;<i><sub>l</sub>(a,x)</i> which has been obtained by nonlinear curve fitting. It comprises a fixed number of terms and yields moderate accuracy (the absolute approximation error of the corresponding normalized incomplete gamma function <i>P</i> is smaller than 0.02 in the range 0.9 &le; <i>a</i> &le; 45 and <i>x</i>&ge;0). Monotonicity and asymptotic behaviour of the original incomplete gamma function is preserved. <br><br> While providing a slight to moderate performance gain on scalar machines (depending on whether <i>a</i> stays the same for subsequent function evaluations or not) compared to established and more accurate methods based on series- or continued fraction expansions with a variable number of terms, a big advantage over these more accurate methods is the applicability on vector CPUs. Here the fixed number of terms enables proper and efficient vectorization. The fixed number of terms might be also beneficial on massively parallel machines to avoid load imbalances, caused by a possibly vastly different number of terms in series expansions to reach convergence at different grid points. For many cloud microphysical applications, the provided moderate accuracy should be enough. However, on scalar machines and if <i>a</i> is the same for subsequent function evaluations, the most efficient method to evaluate incomplete gamma functions is perhaps interpolation of pre-computed regular lookup tables (most simple example: equidistant tables).