Issue 101713 - com.sun.star.sheet.GeneralFunction.STDEV always returns 0
Summary: com.sun.star.sheet.GeneralFunction.STDEV always returns 0
Status: CLOSED DUPLICATE of issue 22625
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 3.0.1
Hardware: Unknown Unknown
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2009-05-09 18:19 UTC by crickert
Modified: 2009-07-12 18:19 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description crickert 2009-05-09 18:19:01 UTC
I wanted to write a little Calc-Addin for statistical analysis of small datasets.
To determine the standard error of a sample, one needs to calculate the standard
deviation first. When writing with Java (SUN JRE 1.6.0_14 / NetBeans 6.5) on a
Ubuntu 9.04 Jaunty system, I used

"com.sun.star.sheet.GeneralFunction.STDEV"

to get the standard deviation. But for a dataset like N={2;4;6} this function
returns a value of "6.92126369412475E-310", not the correct value of "2".

There is a similar issue regarding this function: Issue 22625.

Is this still a bug in OpenOffice 3.x - since OOo 1.1 in 2003!?
Alternatively, is there any kind of patch or workaround available?

Sincerely
Christian
Comment 1 Regina Henschel 2009-05-10 21:32:04 UTC
You can see, that issue 22625 is not fixed yet. Why do you open a new issue?

You can use something like
oRange = oSheet.getCellRangeByPosition(0, 0, 0, 5)
dim oFunction as variant
oFunction = createUnoService("com.sun.star.sheet.FunctionAccess")
dim aArgument(0) as variant
aArgument(0)= oRange
dim result as double
result = oFunction.callFunction( "STDEVP", aArgument() )
Please use a newsgroup or mailing list for further discussing this approach.

*** This issue has been marked as a duplicate of 22625 ***
Comment 2 Mechtilde 2009-07-12 18:12:45 UTC
duplicate -> closed
Comment 3 Mechtilde 2009-07-12 18:19:47 UTC
duplicate -> closed