Issue 94555 - ODFF: introduce GAMMA, CHISQDIST, CHISQINV. Adapt GAMMADIST parameter
Summary: ODFF: introduce GAMMA, CHISQDIST, CHISQINV. Adapt GAMMADIST parameter
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: DEV300m30
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
Depends on:
Reported: 2008-10-01 23:38 UTC by Regina Henschel
Modified: 2013-08-07 15:14 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

contains 9 patch files (5.88 KB, application/x-compressed)
2008-10-01 23:39 UTC, Regina Henschel
no flags Details
updated patch (1.28 KB, text/plain)
2008-12-02 17:16 UTC, Regina Henschel
no flags Details
Testdocuments for Test Case Specification (85.55 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-12-17 22:30 UTC, oc
no flags Details
TestCaseSpecification (8.38 KB, text/html)
2008-12-17 22:31 UTC, oc
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2008-10-01 23:38:32 UTC
This patch contains several changes according to ODFF

(1) Introduce the GAMMA function

I put the GAMMA function to the group "Statistical functions", although it is in
the "Mathematical" group in chapter 6.15 in ODFF spec, because the GAMMALN
function is in "Statistic" too.

The domain of the GAMMA function contains negative values. The ODFF draft spec
is not adapted yet.

(2) Introduce CHISQDIST
In contrast to CHIDIST (now LEGACY.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
I use the same way as the other inverse distribution functions are computed.

(4) Adapt the "cumulative" parameter of the GAMMADIST function to be logical and

(5) Adapt the domain of CHIDIST to allow negativ 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 in issue 90703.

Please notice, that the ODFF draft spec is wrong in the third parameter of
GAMMADIST and GAMMAINV. OOo, Excel, and Gnumeric use the third parameter 'beta'
in the way, that mean=alpha•beta, but ODFF draft spec uses the third parameter
'lambda' in the way that mean=alpha/lambda. The application help must explain,
which use of the parameter OOo has, because the commom usage of the parameter
differs between countries.

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.

The patches are zipped to one file. The patches are made against this versions,
which is m30 and cws odff05:
compiler.hrc    Revision 1.20
opcode.hxx      Revision 1.23
compiler.src    Revision 1.59
scfuncs.hrc     Revision 1.14
scfuncs.src     Revision 1.95
hidother.src    Revision 1.29
interpr.hxx     Revision 1.35
interpr4.cxx    Revision
interpr3.cxx    Revision 1.25
Comment 1 Regina Henschel 2008-10-01 23:39:39 UTC
Created attachment 56967 [details]
contains 9 patch files
Comment 2 Regina Henschel 2008-12-02 17:16:03 UTC
Created attachment 58454 [details]
updated patch
Comment 3 Regina Henschel 2008-12-02 17:22:32 UTC
Hi Eike, I have examined whether the patches are still based on the correct
versions, when using cws odff05. They are all Ok but interpre.hxx. I've attached
a new patch for interpre.hxx, which is now based on version 1.36.
Comment 4 ooo 2008-12-11 02:23:43 UTC
In cws odff05:

revision 265234

Also added a mechanism to write the now optional parameter of GAMMADIST
to PODF and ODFF if omitted, for backwards compatibility.

Note that I changed the parameter description of the optional parameters
to not contain =TRUE() or the word 'default', but conform to the already
existing wording of a few other functions instead. For example:

"0 or FALSE calculates the probability density function. Any other value
or TRUE or omitted calculates the cumulative distribution function."
Comment 5 ooo 2008-12-11 03:21:13 UTC

revision 265237

Excel needs 4 parameters for GAMMADIST, append one if only 3 given.
Comment 6 ooo 2008-12-11 13:34:14 UTC
Reassigning to QA for verification.
Comment 7 oc 2008-12-17 22:30:45 UTC
Created attachment 58909 [details]
Testdocuments for Test Case Specification
Comment 8 oc 2008-12-17 22:31:55 UTC
Created attachment 58910 [details]
Comment 9 oc 2008-12-17 22:32:50 UTC
verified in internal build cws_odff05
Comment 10 thorsten.ziehm 2010-02-22 14:48:28 UTC
This issue is closed automatically. It should be fixed in a version with is
available for longer than half a year (OOo 3.1). If you think this issue isn't
fixed in the current version (OOo 3.2) please reopen it. But then please pay
attention about the field 'target milestone'.
The closure was approved by the Release Status Meeting at 22nd of February 2010
and it is based on the issue handling guideline for fixed/verified issues  :