On Fri May 15 13:11:05 2009, EFL wrote:
Show quoted text> On Wed May 13 05:20:48 2009, SHLOMIF wrote:
> > On Wed May 13 02:26:01 2009, EFL wrote:
> > > The standard_deviation() function appears to be failing in 2.8.
Please
Show quoted text> > > see attached file with code segment including Data::Dumper output
of the
Show quoted text> > > object just after the method failed. Version 2.6 does not have this
> > issue.
> >
> > Hi!
> >
> > Well, your test case was not self-contained, but I was able to reproduce
> > it by entering 6 0.001's based on the ->{'data'} field.
> >
> > This is caused by rounding errors, which makes the calculated variance
> > in that case to be slightly below 0, which later sqrt cannot handle. I
> > added a workaround that checks if the calculated variance is below 0 and
> > if this is the case, assigns 0 to it so everything will work.
> >
> > It will appear in the upcoming Statistics-Descriptive-2.9.
> >
> > Regards,
> >
> > -- Shlomi Fish
>
>
> Sounds reasonable, except that I worked around this by reverting to > 2.6.
Please let me know if the new version works for you. 2.6 won't be
maintained into the future.
Show quoted text> Do you know why this is not an issue in 2.6? It would seem something
> changed that perhaps you haven't addressed.
Well, the algorithm for calculating the values has changed after someone
posted a patch to this very tracker, which seemed logical to me. So it's
possible that Perl yielded slightly different results for the algorithms.
Regards,
-- Shlomi Fish