Several changes according to ODFF.
(1) Introduce the GAMMA function.
(2) Introduce CHISQDIST.
In contrast to CHIDIST it gives the left tail probability, same as other
distributions do. In addition it has an optional parameter to calculate
the density function.
(3) Introduce CHISQINV.
(4) Adapt the "cumulative" parameter of the GAMMADIST function to be
optional. If omitted, the default value 1 is stored in ODF documents and
export to Excel for compatibility.
(5) Adapt the domain of CHIDIST to allow negative x, see ODFF 6.17.10.
(6) Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and
CHIINV because they are no longer needed with the new implementation.
Unfortunately the identifier GAMMAINV is already used for the inverse of
the Gamma-distribution. It can likely be confused to be the inverse of
the Gamma function. A comment in the application help is necessary.
Note: for GAMMADIST and GAMMAINV, the third parameter 'beta' is used in
the way that mean=alphabeta, but ODFF draft spec uses the third
parameter 'lambda' in the way that mean=alpha/lambda. This needs to be
changed in ODFF spec. The application help must explain, which use of
the parameter OOo has, because the common usage of the parameter differs
Note: The domain of the GAMMA function contains negative values. The
ODFF draft spec is not adapted yet.