Apache OpenOffice (AOO) Bugzilla – Issue 94555
ODFF: introduce GAMMA, CHISQDIST, CHISQINV. Adapt GAMMADIST parameter
Last modified: 2013-08-07 15:14:39 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 optional. (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 1.57.98.2 interpr3.cxx Revision 1.25
Created attachment 56967 [details] contains 9 patch files
Created attachment 58454 [details] updated patch
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.
In cws odff05: revision 265234 sc/inc/opcode.hxx sc/inc/scfuncs.hrc sc/inc/tokenarray.hxx sc/source/core/inc/interpre.hxx sc/source/core/src/compiler.src sc/source/core/tool/compiler.cxx sc/source/core/tool/interpr3.cxx sc/source/core/tool/interpr4.cxx sc/source/core/tool/token.cxx sc/source/ui/src/scfuncs.src sc/util/hidother.src 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."
Additionally: revision 265237 sc/source/filter/excel/xeformula.cxx Excel needs 4 parameters for GAMMADIST, append one if only 3 given.
Reassigning to QA for verification.
Created attachment 58909 [details] Testdocuments for Test Case Specification
Created attachment 58910 [details] TestCaseSpecification
verified in internal build cws_odff05
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 : http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues