Skip Menu |

This queue is for tickets about the Statistics-Descriptive CPAN distribution.

Report information
The Basics
Id: 46026
Status: resolved
Priority: 0/
Queue: Statistics-Descriptive

People
Owner: Nobody in particular
Requestors: cpan [...] bluepolka.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.8
Fixed in: (no value)

Attachments


Subject: new failure of standard_deviation()
The standard_deviation() function appears to be failing in 2.8. Please see attached file with code segment including Data::Dumper output of the object just after the method failed. Version 2.6 does not have this issue.
Subject: Statistics::Descriptive.bugreport
Download Statistics::Descriptive.bugreport
application/octet-stream 2.5k

Message body not shown because it is not plain text.

On Wed May 13 02:26:01 2009, EFL wrote: Show quoted text
> The standard_deviation() function appears to be failing in 2.8. Please > see attached file with code segment including Data::Dumper output of the > object just after the method failed. Version 2.6 does not have this
issue. System info: $ uname -a Linux app74 2.6.18-92.el5PAE #1 SMP Tue Apr 29 13:31:02 EDT 2008 i686 i686 i386 GNU/Linux $ perl -v This is perl, v5.8.8 built for i386-linux-thread-multi
On Wed May 13 02:26:01 2009, EFL wrote: Show quoted text
> The standard_deviation() function appears to be failing in 2.8. Please > see attached file with code segment including Data::Dumper output of the > 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
On Wed May 13 05:20:48 2009, SHLOMIF wrote: Show quoted text
> On Wed May 13 02:26:01 2009, EFL wrote:
> > The standard_deviation() function appears to be failing in 2.8. Please > > see attached file with code segment including Data::Dumper output of the > > 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. Do you know why this is not an issue in 2.6? It would seem something changed that perhaps you haven't addressed.
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