You can use the \(\text{Q}\) function to calculate the regularized or normalized upper incomplete gamma function.

You can use the \qgamma backslash command to insert this function.

The following variants of this function are available:

  • \(\text{complex } \text{Q} \left ( \text{<s>}, \text{<z>} \right )\)

The values \(\text{<s>}\) and \(\text{<z>}\) can be any basic type. The \(\text{Q}\) function is defined over the range \(\Re \left ( z \right ) \geq 0\) and \(\Re \left ( s \right ) > 0\). The \(\\text{Q}\) function will generate a run-time error or report NaN for values outside of this range.

Note that run-time type conversion allows the result of this function to be assigned to any basic type provided the returned value is compatible with that type. Aion will also select one of several optimized versions depending on the supplied parameter values.

The \(\text{Q}\) function is defined as:

\[\text{Q} \left ( s, z \right ) = \frac{ \Gamma \left ( s, z \right ) } { \Gamma \left ( s \right ) }\]

and is related to the \(\text{P}\) function by

\[\text{Q} \left (s , z \right ) = 1 - \text{P} \left ( s, z \right )\]

The Aion implementation of the regularized upper incomplete gamma function uses the algorithm described in [7].

The examples below show how you can use the \(\text{Q}\) function:

\[e = \frac{1}{\text{Q} \left ( 1, 1 \right ) }\]
\[\text{ e = 2.7182818284590450908 }\]