# Difference between revisions of "Calc/ODFF Implementation/Examine functions"

From Apache OpenOffice Wiki

< Calc | ODFF Implementation

(→Examine Changes in Functions for ODFv1.2) |
(Update BITLSHIFT and BITRSHIFT) |
||

(10 intermediate revisions by 4 users not shown) | |||

Line 1: | Line 1: | ||

== Examine Changes in Functions for ODFv1.2 == | == Examine Changes in Functions for ODFv1.2 == | ||

+ | |||

This is a collection of the differences I found and what I know is already done or in progress. I also note, when I found problems in the draft spec itself. You are invited to add your observations. [[User:Regina|Regina]] 19:40, 10 October 2008 (CEST) | This is a collection of the differences I found and what I know is already done or in progress. I also note, when I found problems in the draft spec itself. You are invited to add your observations. [[User:Regina|Regina]] 19:40, 10 October 2008 (CEST) | ||

Line 7: | Line 8: | ||

|- | |- | ||

! Function !! ODFv1.2 !! CALC !! Action !! Progress || | ! Function !! ODFv1.2 !! CALC !! Action !! Progress || | ||

− | |||

|- | |- | ||

! AVERAGEIF | ! AVERAGEIF | ||

− | | || | + | | || implemented || implementation by Marina (makkica) ||{{bug|101466}} <br> integrated in LibO 4.0 || |

− | + | ||

|- | |- | ||

! AVERAGEIFS | ! AVERAGEIFS | ||

− | | || | + | | || implemented || implementation by Marina (makkica) ||{{bug|101466}} <br> integrated in LibO 4.0 || |

− | + | ||

|- | |- | ||

! BETADIST | ! BETADIST | ||

− | | Draft Spec misses faktor 1/(b-a) in densitiy case || not yet implemented | + | | Draft Spec misses faktor 1/(b-a) in densitiy case || not yet implemented || Inform [[User:ErAck|Eike Rathke]] ||correct in draft 22a of ODFF || |

|- | |- | ||

| ||Has density case and optional parameter, to choose between density and cumulative || not yet implemented || expand function to density case and additional parameter,tracked in {{Bug|91547}} || integrated in OOo3.2|| | | ||Has density case and optional parameter, to choose between density and cumulative || not yet implemented || expand function to density case and additional parameter,tracked in {{Bug|91547}} || integrated in OOo3.2|| | ||

− | |||

|- | |- | ||

! BINOMDIST | ! BINOMDIST | ||

− | | Parameter C is integer with constraint to 0 and 1. It should be Logical as in other distributions || C=0 is density, all other values of C are treated as cumulative | + | | Parameter C is integer with constraint to 0 and 1. It should be Logical as in other distributions || C=0 is density, all other values of C are treated as cumulative || || || |

− | + | ||

|- | |- | ||

! LEGACY.CHIDIST | ! LEGACY.CHIDIST | ||

| Returns 1 for x <0 || x < 0 returns Err:502 || expand domain to x < 0 internal,patch in {{Bug|94555}} ||integrated in OOo3.2 || | | Returns 1 for x <0 || x < 0 returns Err:502 || expand domain to x < 0 internal,patch in {{Bug|94555}} ||integrated in OOo3.2 || | ||

− | |||

|- | |- | ||

! CHISQDIST | ! CHISQDIST | ||

| density function and cumulative left tail of chi-square distribution || not yet implemented || prepare Implementation, patch in {{Bug|94555}} || integrated in OOo3.2 || | | density function and cumulative left tail of chi-square distribution || not yet implemented || prepare Implementation, patch in {{Bug|94555}} || integrated in OOo3.2 || | ||

− | |||

|- | |- | ||

! CHISQINV | ! CHISQINV | ||

− | | inverse of CHISQDIST(...TRUE()) || not yet implemented | + | | inverse of CHISQDIST(...TRUE()) || not yet implemented || prepare Implementation, patch in {{Bug|94555}} || integrated in OOo3.2 || |

− | + | ||

|- | |- | ||

! EXPONDIST | ! EXPONDIST | ||

| Parameter ''Cumulative'' has type Logical and is optional. || Last Parameter C has type Number and is not optional. C=0 returns denisity, other values for C return cumulative function. || || || | | Parameter ''Cumulative'' has type Logical and is optional. || Last Parameter C has type Number and is not optional. C=0 returns denisity, other values for C return cumulative function. || || || | ||

− | |||

|- | |- | ||

! FDIST | ! FDIST | ||

| density function and cumulative left tail of F-distribution || not yet implemented|| prepare for implementation || first draft, depends on BETADIST {{Bug|91547}} || | | density function and cumulative left tail of F-distribution || not yet implemented|| prepare for implementation || first draft, depends on BETADIST {{Bug|91547}} || | ||

|- | |- | ||

− | | || | + | | || || Name conflicts with actual FDIST, which calculates right tail. OOo2.4 does not handle namespace correctly and takes new FDIST as old one || get new UI-name || have brought problem to dev@sc || |

− | + | ||

|- | |- | ||

! FINV | ! FINV | ||

| inverse of new FDIST || not yet implemented || || || | | inverse of new FDIST || not yet implemented || || || | ||

|- | |- | ||

− | | || | + | | || || Name conflicts with actual FINV, which calculates inverse for right tail. || get new UI-name || || |

− | + | ||

|- | |- | ||

! GAMMA | ! GAMMA | ||

− | | Parameter is constraint to >= 0 || Gamma is definied for all real numbers, but non-positive integers || | + | | Parameter is constraint to >= 0 || Gamma is definied for all real numbers, but non-positive integers || Inform [[User:ErAck|Eike Rathke]] || || |

|- | |- | ||

− | | || | + | | || ||not yet implemented || prepare implementation using full domain. Add UI texts. patch in {{Bug|94555}} || integrated in OOo3.2|| |

|- | |- | ||

− | | ||is in subgroup Mathematical functions | + | | ||is in subgroup Mathematical functions || will go to subgroup Statistical functions || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/] || |

− | + | ||

|- | |- | ||

! GAMMALN | ! GAMMALN | ||

− | | is in subgroup Mathematical Functions | + | | is in subgroup Mathematical Functions || is in subgroup Statistical Functions || || || |

− | + | ||

|- | |- | ||

! GAMMADIST | ! GAMMADIST | ||

Line 71: | Line 59: | ||

|- | |- | ||

| ||Domain for Parameter x includes x < 0 || x < 0 returns Err:502 in OOo2.* || Change implementation || integrated in OOo3.0 || | | ||Domain for Parameter x includes x < 0 || x < 0 returns Err:502 in OOo2.* || Change implementation || integrated in OOo3.0 || | ||

− | |||

|- | |- | ||

! GROWTH | ! GROWTH | ||

Line 77: | Line 64: | ||

|- | |- | ||

| ||is in subgroup Statistical Functions (in Excel too) || is in subgroup Array Functions || || || | | ||is in subgroup Statistical Functions (in Excel too) || is in subgroup Array Functions || || || | ||

− | |||

|- | |- | ||

! HYPGEOMDIST | ! HYPGEOMDIST | ||

− | | Optional, logical parameter to calculate "exact" or | + | | Optional, logical parameter to calculate "exact" or "at most" || no parameter, calculates always "exact" || || || |

− | + | ||

|- | |- | ||

! INTERCEPT | ! INTERCEPT | ||

| Current, "Calculates the point at which a line will intersect the y-values by using known x-values and y-values." (BTW: That is literally from Excel help.) Problems:1. It calculates no point but a single value. 2. The line does not intersect the y-values but the y-axis. 3. It does not say, that the line is the linear regression of the known values.|| || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/] || | | Current, "Calculates the point at which a line will intersect the y-values by using known x-values and y-values." (BTW: That is literally from Excel help.) Problems:1. It calculates no point but a single value. 2. The line does not intersect the y-values but the y-axis. 3. It does not say, that the line is the linear regression of the known values.|| || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/] || | ||

− | |||

|- | |- | ||

! NORMDIST | ! NORMDIST | ||

Line 91: | Line 75: | ||

|- | |- | ||

| || ||Accuracy is insufficient for x<−2 because cancellation.||New implementation with ERFC.{{Bug|69069}}, {{Bug|97091}} ||integrated in OOo3.2|| | | || ||Accuracy is insufficient for x<−2 because cancellation.||New implementation with ERFC.{{Bug|69069}}, {{Bug|97091}} ||integrated in OOo3.2|| | ||

− | |||

|- | |- | ||

! LEGACY.NORMSDIST | ! LEGACY.NORMSDIST | ||

Line 97: | Line 80: | ||

|- | |- | ||

| || ||Accuracy is insufficient for x<−2 because cancellation.||New implementation with ERFC. {{Bug|69069}}, {{Bug|97091}}|| integrated in OOo3.2|| | | || ||Accuracy is insufficient for x<−2 because cancellation.||New implementation with ERFC. {{Bug|69069}}, {{Bug|97091}}|| integrated in OOo3.2|| | ||

− | |||

|- | |- | ||

! LOGNORMDIST | ! LOGNORMDIST | ||

| Four parameters, all but first parameter are optional ||Three parameters, all required||Change implementation {{Bug|100119}}|| integrated in OOo3.2 || | | Four parameters, all but first parameter are optional ||Three parameters, all required||Change implementation {{Bug|100119}}|| integrated in OOo3.2 || | ||

− | |||

|- | |- | ||

! PERCENTRANK | ! PERCENTRANK | ||

| It has an optional parameter ''Significance''||not yet implemented|| || || | | It has an optional parameter ''Significance''||not yet implemented|| || || | ||

− | |||

|- | |- | ||

! PHI | ! PHI | ||

| Description is unclear. PHI(x)=NORMDIST(x;0;1;FALSE()). It is the density function of the standard normal distribution || || ||correct in draft 22a of ODFF || | | Description is unclear. PHI(x)=NORMDIST(x;0;1;FALSE()). It is the density function of the standard normal distribution || || ||correct in draft 22a of ODFF || | ||

− | |||

|- | |- | ||

! POISSON | ! POISSON | ||

| Parameter ''Cumulative'' has type Logical and is optional.|| Parameter 'C' is required. 'C'=0 is density function, all others are cumulative||change in calc {{Bug|96837}}|| integrated in OOo3.1|| | | Parameter ''Cumulative'' has type Logical and is optional.|| Parameter 'C' is required. 'C'=0 is density function, all others are cumulative||change in calc {{Bug|96837}}|| integrated in OOo3.1|| | ||

− | |||

|- | |- | ||

! QUARTILE | ! QUARTILE | ||

| Example calculates with ''Quart=1.5'' although there is a constraint INT(Quart)=Quart|| || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/]|| | | Example calculates with ''Quart=1.5'' although there is a constraint INT(Quart)=Quart|| || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/]|| | ||

− | |||

|- | |- | ||

! RANK | ! RANK | ||

| Description "If not 0, Data is ranked in descending order." has to be "If not 0, Data is ranked in ascending order."|| || ||correct in draft 22a of ODFF || | | Description "If not 0, Data is ranked in descending order." has to be "If not 0, Data is ranked in ascending order."|| || ||correct in draft 22a of ODFF || | ||

− | |||

|- | |- | ||

! SKEWP | ! SKEWP | ||

| || not yet implemented|| || || | | || not yet implemented|| || || | ||

− | |||

|- | |- | ||

! STDEVA | ! STDEVA | ||

| The text "cells with text are converted to 0;" conflicts with "The handling of strings is implementation defined."|| || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/] || | | The text "cells with text are converted to 0;" conflicts with "The handling of strings is implementation defined."|| || ||Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/] || | ||

− | |||

|- | |- | ||

! TDIST | ! TDIST | ||

− | | In Draft 26 it was corrected to show the cumulative function. In addition it was renamed to LEGACY.TDIST to be consistent with other right tailed distributions. || Calc (and Excel) evaluates the cumulative function. | + | | In Draft 26 it was corrected to show the cumulative function. In addition it was renamed to LEGACY.TDIST to be consistent with other right tailed distributions. || Calc (and Excel) evaluates the cumulative function. ||Implementation has to be adapted.|| not started || |

− | + | ||

|- | |- | ||

! TREND | ! TREND | ||

Line 139: | Line 112: | ||

|- | |- | ||

| ||Parameter ''AllowOffset'' is Logical|| Parameter is 0 or ''not 0''|| || || | | ||Parameter ''AllowOffset'' is Logical|| Parameter is 0 or ''not 0''|| || || | ||

− | |||

|- | |- | ||

! TRIMMEAN | ! TRIMMEAN | ||

| The limits in the definition formula are wrong. Either count i from 0, then sum from i=cutOff to n−1−cutOff, or count i from 1, then sum from i=cutOff+1 to n−cutOff || || ||correct in draft 22a of ODFF || | | The limits in the definition formula are wrong. Either count i from 0, then sum from i=cutOff to n−1−cutOff, or count i from 1, then sum from i=cutOff+1 to n−cutOff || || ||correct in draft 22a of ODFF || | ||

− | |||

|- | |- | ||

! TTEST | ! TTEST | ||

− | | (1) All formulas miss the degrees of freedom. It is necessary for TDIST. In case unequal variance there must be defined, whether the degrees of freedom are made integer by FLOOR or whether they remain real. (2) case paired: <math>\scriptstyle \sqrt {n-1}</math> is wrong because it is already contained in <math> s_{X_1 - X_2}</math>. (3) case equal variance: definition of s² is missing. (4) case unequal variance: definition does not meet usual definitions. In fact it is the definition for the equal variance case, with pooled variance.(5) As TDIST actually returns the values of the CDF, this formulas has to be revised together with TDIST.|| ||Corrent implementation fits to draft, no action needed. ||draft 22a of ODFF has got correct definition for type 2 and 3, type 1 has got an error, which will be corrected soon. || | + | | (1) All formulas miss the degrees of freedom. It is necessary for TDIST. In case unequal variance there must be defined, whether the degrees of freedom are made integer by FLOOR or whether they remain real. (2) case paired: <math>\scriptstyle \sqrt {n-1}</math> is wrong because it is already contained in <math> s_{X_1 - X_2}</math>. (3) case equal variance: definition of s² is missing. (4) case unequal variance: definition does not meet usual definitions. In fact it is the definition for the equal variance case, with pooled variance.(5) As TDIST actually returns the values of the CDF, this formulas has to be revised together with TDIST.|| ||Corrent implementation fits to draft, no action needed. ||draft 22a of ODFF has got correct definition for type 2 and 3, type 1 has got an error, which will be corrected soon. || |

− | + | ||

|- | |- | ||

! WEIBULL | ! WEIBULL | ||

Line 153: | Line 123: | ||

|- | |- | ||

| ||Alpha and Beta are exchanged in the formula, compared with the current implementation in OOo, Excel and Gnumeric.|| || ||Draft 22a of ODFF has got a better description. || | | ||Alpha and Beta are exchanged in the formula, compared with the current implementation in OOo, Excel and Gnumeric.|| || ||Draft 22a of ODFF has got a better description. || | ||

− | |||

|- | |- | ||

! ZTEST | ! ZTEST | ||

| || Calc calculates z-value wrong. Read discussion in {{Bug|90759}} || Correct sigma-bug|| integrated in OOo3.2|| | | || Calc calculates z-value wrong. Read discussion in {{Bug|90759}} || Correct sigma-bug|| integrated in OOo3.2|| | ||

|- | |- | ||

− | | || | + | | || || Uses instable algorithm for standard deviation.||Change to stable version or use STDEV directly.|| || |

|- | |- | ||

− | | || Calculates <math>\scriptstyle 1-P( -|z| \le Z \le |z|)</math>|| Beside the sigma-bug OOo calculates <math>\scriptstyle 1-P( Z \le z)</math> for z>0 and <math>\scriptstyle P( Z \le |z|)</math> for z<0|| | + | | || Calculates <math>\scriptstyle 1-P( -|z| \le Z \le |z|)</math>|| Beside the sigma-bug OOo calculates <math>\scriptstyle 1-P( Z \le z)</math> for z>0 and <math>\scriptstyle P( Z \le |z|)</math> for z<0|| || Mail to OASIS [http://lists.oasis-open.org/archives/office-comment/] || |

− | + | ||

|- | |- | ||

! Functionname | ! Functionname | ||

− | | ODF || Calc | + | | ODF || Calc || Action || Progress || |

|} | |} | ||

Line 170: | Line 138: | ||

{| class="wikitable" | {| class="wikitable" | ||

− | |||

|- | |- | ||

! Function !! ODFv1.2 !! CALC !! Action !! Progress || | ! Function !! ODFv1.2 !! CALC !! Action !! Progress || | ||

− | |||

|- | |- | ||

! CEILING | ! CEILING | ||

| Already second parameter (significance) is optional. || Only third parameter (mode) is optional. || Change in Calc and write additional parameter to file for backwards compatibility (not that easy because the actual value depends on the first parameter). <br> Until then let at least the interpreter handle it as optional. || - || | | Already second parameter (significance) is optional. || Only third parameter (mode) is optional. || Change in Calc and write additional parameter to file for backwards compatibility (not that easy because the actual value depends on the first parameter). <br> Until then let at least the interpreter handle it as optional. || - || | ||

− | |||

|- | |- | ||

! FLOOR | ! FLOOR | ||

| Already second parameter (significance) is optional. || Only third parameter (mode) is optional. || Change in Calc and write additional parameter to file for backwards compatibility (not that easy because the actual value depends on the first parameter). <br> Until then let at least the interpreter handle it as optional. || - || | |||

− | |||

|- | |- | ||

! GCD | ! GCD | ||

− | | "Return the largest value that can be evenly divided (no remainder) into the given numbers." Should be "Return the largest value that can divide the given numbers evenly (no remainder)."|| - | + | | "Return the largest value that can be evenly divided (no remainder) into the given numbers." Should be "Return the largest value that can divide the given numbers evenly (no remainder)."|| - || - || Text is correct since OpenFormula draft 22.|| |

− | + | ||

|- | |- | ||

! LOG | ! LOG | ||

| Base (third parameter) is optional with default 10.||All parameters are required.||Change in Calc||Done (Lvyue) {{Bug|96835}}, integrated to OOo3.1|| | | Base (third parameter) is optional with default 10.||All parameters are required.||Change in Calc||Done (Lvyue) {{Bug|96835}}, integrated to OOo3.1|| | ||

− | |||

|- | |- | ||

! ISOWEEKNUM | ! ISOWEEKNUM | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! DATEDIF | ! DATEDIF | ||

− | | || not implemented yet || || || | + | | || not implemented yet || implementation by Winfried Donkers and Eike Rathke || implemented in LibO 3.6.0 || |

− | + | ||

|- | |- | ||

! PDURATION | ! PDURATION | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! COUNTIFS | ! COUNTIFS | ||

− | | || | + | | || implemented || implementation by Marina (makkica) ||{{bug|90269}} <br> integrated in LibO 4.0 || |

− | + | ||

|- | |- | ||

! NUMBERVALUE | ! NUMBERVALUE | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! XOR | ! XOR | ||

− | | || | + | | || implemented || implementation by Marina (makkica) || <br> implemented in LibO 4.0 by Winfried Donkers || |

− | + | ||

|- | |- | ||

! IFERROR | ! IFERROR | ||

− | | || not implemented yet || ||{{bug|92677}} || | + | | || not implemented yet || implementation by Winfried Donkers and Eike Rathke ||{{bug|92677}} <br> implemented in LibO 4.0 || |

− | + | ||

|- | |- | ||

! IFNA | ! IFNA | ||

− | | || not implemented yet || ||{{bug|92677}} || | + | | || not implemented yet || implementation by Winfried Donkers and Eike Rathke ||{{bug|92677}} <br> implemented in LibO 4.0 || |

− | + | ||

|- | |- | ||

! CSC | ! CSC | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} <br> integrated in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! CSCH | ! CSCH | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} <br> integrated in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! SEC | ! SEC | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} <br> integrated in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! SECH | ! SECH | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111413}} || | + | |

− | + | ||

|- | |- | ||

! SUMIFS | ! SUMIFS | ||

− | | || | + | | || implemented || implementation by Marina (makkica) ||{{bug|95144}} <br> integrated in LibO 4.0 || |

− | + | ||

|- | |- | ||

! BITAND | ! BITAND | ||

− | | || | + | | || implemented; Excel import/export TODO || implementation by Pathangi Janardhanan Jatinshravan||{{bug|111519}} <br> implemented in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! BITLSHIFT | ! BITLSHIFT | ||

− | | || | + | | || implemented; Excel import/export TODO || implementation by Pathangi Janardhanan Jatinshravan||{{bug|111519}} <br> implemented in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! BITOR | ! BITOR | ||

− | | || | + | | || implemented; Excel import/export TODO || implementation by Pathangi Janardhanan Jatinshravan||{{bug|111519}} <br> implemented in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! BITRSHIFT | ! BITRSHIFT | ||

− | | || | + | | || implemented; Excel import/export TODO || implementatin by Pathangi Janardhanan Jatinshravan||{{bug|111519}} <br> implemented in LibO 3.5.0 || |

− | + | ||

|- | |- | ||

! BITXOR | ! BITXOR | ||

− | | || | + | |

− | + | ||

|- | |- | ||

! FINDB | ! FINDB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! LEFTB | ! LEFTB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! LENB | ! LENB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! MIDB | ! MIDB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! REPLACEB | ! REPLACEB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! RIGHTB | ! RIGHTB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! SEARCHB | ! SEARCHB | ||

| || not implemented yet || || || | | || not implemented yet || || || | ||

− | |||

|- | |- | ||

! IMCSCH | ! IMCSCH | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} <br> integrated in LibO 3.6.0 || |

− | + | ||

|- | |- | ||

! IMSEC | ! IMSEC | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} <br> integrated in LibO 3.6.0 || |

− | + | ||

|- | |- | ||

! IMSECH | ! IMSECH | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} <br> integrated in LibO 3.6.0 || |

− | + | |- | |

+ | ! IMSINH | ||

+ | |||

+ | |- | ||

+ | ! IMCOSH | ||

+ | |||

|- | |- | ||

! IMTAN | ! IMTAN | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]]||Patch in {{bug|111609}} || | + | | || not implemented yet ||Implementation by [[User:Regina|Regina]]||Patch in {{bug|111609}} <br> integrated in LibO 3.6.0 || |

− | + | ||

|- | |- | ||

! IMCOT | ! IMCOT | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} || | + | |

− | + | ||

|- | |- | ||

! IMCSC | ! IMCSC | ||

− | | || not implemented yet ||Implementation by [[User:Regina|Regina]] ||Patch in {{bug|111609}} || | + | |

− | + | ||

|- | |- | ||

! Functionname | ! Functionname | ||

− | | ODF || Calc | + | | ODF || Calc || Action || Progress || |

|} | |} | ||

---- | ---- | ||

+ | |||

[[Category:Calc]] | [[Category:Calc]] | ||

+ | |||

[[Category:To-Do]] | [[Category:To-Do]] |

## Latest revision as of 18:21, 6 December 2015

## Examine Changes in Functions for ODFv1.2

This is a collection of the differences I found and what I know is already done or in progress. I also note, when I found problems in the draft spec itself. You are invited to add your observations. Regina 19:40, 10 October 2008 (CEST)

### Statistical Functions

Function | ODFv1.2 | CALC | Action | Progress | |
---|---|---|---|---|---|

AVERAGEIF | implemented | implementation by Marina (makkica) | Issue 101466 integrated in LibO 4.0 |
||

AVERAGEIFS | implemented | implementation by Marina (makkica) | Issue 101466 integrated in LibO 4.0 |
||

BETADIST | Draft Spec misses faktor 1/(b-a) in densitiy case | not yet implemented | Inform Eike Rathke | correct in draft 22a of ODFF | |

Has density case and optional parameter, to choose between density and cumulative | not yet implemented | expand function to density case and additional parameter,tracked in Issue 91547 | integrated in OOo3.2 | ||

BINOMDIST | Parameter C is integer with constraint to 0 and 1. It should be Logical as in other distributions | C=0 is density, all other values of C are treated as cumulative | |||

LEGACY.CHIDIST | Returns 1 for x <0 | x < 0 returns Err:502 | expand domain to x < 0 internal,patch in Issue 94555 | integrated in OOo3.2 | |

CHISQDIST | density function and cumulative left tail of chi-square distribution | not yet implemented | prepare Implementation, patch in Issue 94555 | integrated in OOo3.2 | |

CHISQINV | inverse of CHISQDIST(...TRUE()) | not yet implemented | prepare Implementation, patch in Issue 94555 | integrated in OOo3.2 | |

EXPONDIST | Parameter Cumulative has type Logical and is optional. |
Last Parameter C has type Number and is not optional. C=0 returns denisity, other values for C return cumulative function. | |||

FDIST | density function and cumulative left tail of F-distribution | not yet implemented | prepare for implementation | first draft, depends on BETADIST Issue 91547 | |

Name conflicts with actual FDIST, which calculates right tail. OOo2.4 does not handle namespace correctly and takes new FDIST as old one | get new UI-name | have brought problem to dev@sc | |||

FINV | inverse of new FDIST | not yet implemented | |||

Name conflicts with actual FINV, which calculates inverse for right tail. | get new UI-name | ||||

GAMMA | Parameter is constraint to >= 0 | Gamma is definied for all real numbers, but non-positive integers | Inform Eike Rathke | ||

not yet implemented | prepare implementation using full domain. Add UI texts. patch in Issue 94555 | integrated in OOo3.2 | |||

is in subgroup Mathematical functions | will go to subgroup Statistical functions | Mail to OASIS [1] | |||

GAMMALN | is in subgroup Mathematical Functions | is in subgroup Statistical Functions | |||

GAMMADIST | Last Parameter has type Logical | Last Parameter has type Number | Change type internal to bool. Change UI texts. patch in Issue 94555 | integrated in OOo3.2 | |

Domain for Parameter x includes x < 0 | x < 0 returns Err:502 in OOo2.* | Change implementation | integrated in OOo3.0 | ||

GROWTH | Last parameter has type Logical (in Excel too) | Last parameter has type Number | |||

is in subgroup Statistical Functions (in Excel too) | is in subgroup Array Functions | ||||

HYPGEOMDIST | Optional, logical parameter to calculate "exact" or "at most" | no parameter, calculates always "exact" | |||

INTERCEPT | Current, "Calculates the point at which a line will intersect the y-values by using known x-values and y-values." (BTW: That is literally from Excel help.) Problems:1. It calculates no point but a single value. 2. The line does not intersect the y-values but the y-axis. 3. It does not say, that the line is the linear regression of the known values. | Mail to OASIS [2] | |||

NORMDIST | Last Parameter has type Logical and is optional | Last Parameter has type Number and is required | Change implementation, Issue 100119 | integrated in OOo3.2 | |

Accuracy is insufficient for x<−2 because cancellation. | New implementation with ERFC.Issue 69069 , Issue 97091 | integrated in OOo3.2 | |||

LEGACY.NORMSDIST | "This is exactly NORMDIST(x)." Should be "This is exactly NORMDIST(x;0;1)." because mean parameter and standard deviation parameter are not optional. | correct in draft 22a of ODFF | |||

Accuracy is insufficient for x<−2 because cancellation. | New implementation with ERFC. Issue 69069 , Issue 97091 | integrated in OOo3.2 | |||

LOGNORMDIST | Four parameters, all but first parameter are optional | Three parameters, all required | Change implementation Issue 100119 | integrated in OOo3.2 | |

PERCENTRANK | It has an optional parameter Significance |
not yet implemented | |||

PHI | Description is unclear. PHI(x)=NORMDIST(x;0;1;FALSE()). It is the density function of the standard normal distribution | correct in draft 22a of ODFF | |||

POISSON | Parameter Cumulative has type Logical and is optional. |
Parameter 'C' is required. 'C'=0 is density function, all others are cumulative | change in calc Issue 96837 | integrated in OOo3.1 | |

QUARTILE | Example calculates with Quart=1.5 although there is a constraint INT(Quart)=Quart |
Mail to OASIS [3] | |||

RANK | Description "If not 0, Data is ranked in descending order." has to be "If not 0, Data is ranked in ascending order." | correct in draft 22a of ODFF | |||

SKEWP | not yet implemented | ||||

STDEVA | The text "cells with text are converted to 0;" conflicts with "The handling of strings is implementation defined." | Mail to OASIS [4] | |||

TDIST | In Draft 26 it was corrected to show the cumulative function. In addition it was renamed to LEGACY.TDIST to be consistent with other right tailed distributions. | Calc (and Excel) evaluates the cumulative function. | Implementation has to be adapted. | not started | |

TREND | The optional parameters knownX and newX may be empty, denoted as ;; |
knownX and knownY cannot be empty |
|||

Parameter AllowOffset is Logical |
Parameter is 0 or not 0 |
||||

TRIMMEAN | The limits in the definition formula are wrong. Either count i from 0, then sum from i=cutOff to n−1−cutOff, or count i from 1, then sum from i=cutOff+1 to n−cutOff | correct in draft 22a of ODFF | |||

TTEST | (1) All formulas miss the degrees of freedom. It is necessary for TDIST. In case unequal variance there must be defined, whether the degrees of freedom are made integer by FLOOR or whether they remain real. (2) case paired: is wrong because it is already contained in . (3) case equal variance: definition of s² is missing. (4) case unequal variance: definition does not meet usual definitions. In fact it is the definition for the equal variance case, with pooled variance.(5) As TDIST actually returns the values of the CDF, this formulas has to be revised together with TDIST. | Corrent implementation fits to draft, no action needed. | draft 22a of ODFF has got correct definition for type 2 and 3, type 1 has got an error, which will be corrected soon. | ||

WEIBULL | Parameter Cumulative is logical. |
Parameter is 0 or not 0 |
|||

Alpha and Beta are exchanged in the formula, compared with the current implementation in OOo, Excel and Gnumeric. | Draft 22a of ODFF has got a better description. | ||||

ZTEST | Calc calculates z-value wrong. Read discussion in Issue 90759 | Correct sigma-bug | integrated in OOo3.2 | ||

Uses instable algorithm for standard deviation. | Change to stable version or use STDEV directly. | ||||

Calculates | Beside the sigma-bug OOo calculates for z>0 and for z<0 | Mail to OASIS [5] | |||

Functionname | ODF | Calc | Action | Progress |

### Other Functions

Function | ODFv1.2 | CALC | Action | Progress | |
---|---|---|---|---|---|

CEILING | Already second parameter (significance) is optional. | Only third parameter (mode) is optional. | Change in Calc and write additional parameter to file for backwards compatibility (not that easy because the actual value depends on the first parameter). Until then let at least the interpreter handle it as optional. |
- | |

FLOOR | Already second parameter (significance) is optional. | Only third parameter (mode) is optional. | Change in Calc and write additional parameter to file for backwards compatibility (not that easy because the actual value depends on the first parameter). Until then let at least the interpreter handle it as optional. |
- | |

GCD | "Return the largest value that can be evenly divided (no remainder) into the given numbers." Should be "Return the largest value that can divide the given numbers evenly (no remainder)." | - | - | Text is correct since OpenFormula draft 22. | |

LOG | Base (third parameter) is optional with default 10. | All parameters are required. | Change in Calc | Done (Lvyue) Issue 96835 , integrated to OOo3.1 | |

ISOWEEKNUM | not implemented yet | ||||

DATEDIF | not implemented yet | implementation by Winfried Donkers and Eike Rathke | implemented in LibO 3.6.0 | ||

PDURATION | not implemented yet | ||||

COUNTIFS | implemented | implementation by Marina (makkica) | Issue 90269 integrated in LibO 4.0 |
||

NUMBERVALUE | not implemented yet | ||||

XOR | implemented | implementation by Marina (makkica) | implemented in LibO 4.0 by Winfried Donkers |
||

IFERROR | not implemented yet | implementation by Winfried Donkers and Eike Rathke | Issue 92677 implemented in LibO 4.0 |
||

IFNA | not implemented yet | implementation by Winfried Donkers and Eike Rathke | Issue 92677 implemented in LibO 4.0 |
||

CSC | not implemented yet | Implementation by Regina | Patch in Issue 111413 integrated in LibO 3.5.0 |
||

CSCH | not implemented yet | Implementation by Regina | Patch in Issue 111413 integrated in LibO 3.5.0 |
||

SEC | not implemented yet | Implementation by Regina | Patch in Issue 111413 integrated in LibO 3.5.0 |
||

SECH | not implemented yet | Implementation by Regina | Patch in Issue 111413 integrated in LibO 3.5.0 |
||

SUMIFS | implemented | implementation by Marina (makkica) | Issue 95144 integrated in LibO 4.0 |
||

BITAND | implemented; Excel import/export TODO | implementation by Pathangi Janardhanan Jatinshravan | Issue 111519 implemented in LibO 3.5.0 |
||

BITLSHIFT | implemented; Excel import/export TODO | implementation by Pathangi Janardhanan Jatinshravan | Issue 111519 implemented in LibO 3.5.0 |
||

BITOR | implemented; Excel import/export TODO | implementation by Pathangi Janardhanan Jatinshravan | Issue 111519 implemented in LibO 3.5.0 |
||

BITRSHIFT | implemented; Excel import/export TODO | implementatin by Pathangi Janardhanan Jatinshravan | Issue 111519 implemented in LibO 3.5.0 |
||

BITXOR | implemented; Excel import/export TODO | implementation by Pathangi Janardhanan Jatinshravan | Issue 111519 implemented in LibO 3.5.0 |
||

FINDB | not implemented yet | ||||

LEFTB | not implemented yet | ||||

LENB | not implemented yet | ||||

MIDB | not implemented yet | ||||

REPLACEB | not implemented yet | ||||

RIGHTB | not implemented yet | ||||

SEARCHB | not implemented yet | ||||

IMCSCH | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMSEC | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMSECH | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMSINH | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMCOSH | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMTAN | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMCOT | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

IMCSC | not implemented yet | Implementation by Regina | Patch in Issue 111609 integrated in LibO 3.6.0 |
||

Functionname | ODF | Calc | Action | Progress |