bugGNU Scientific Library - Bugs: bug #58202, Wrong Result Median for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58202: Wrong Result Median for gsl_rstat_quantile_get with fix

Submitter:  Jonathan Schmalfuß <joscao>
Submitted:  Sat 18 Apr 2020 06:26:00 PM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Operating System:  Ubuntu 18.04.4 LTS
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  12.6

Discussion

Wed 20 Jan 2021 05:43:04 AM UTC, comment #1: 

fixed in commit 42933198abec39071c1ae1bdf2d7e3adeed233a2

Patrick Alken <psa>
Group administrator
Sat 18 Apr 2020 06:26:00 PM UTC, original submission:  

In: rquantile.c

double gsl_rstat_quantile_get(gsl_rstat_quantile_workspace *w)

Check against w->n >= 5, should be check against w->n > 5.

Because first time sorting of underlying data in:
int gsl_rstat_quantile_add(const double x, gsl_rstat_quantile_workspace *w)

happens when n turns 6 and not when n turns 5.

Has slipped through test in Documentation 22.5 Examples.
Median of dataset
{
17.2, 18.1, 16.5, 18.3, 12.6 = dataset
12.6, 16.5, 17.2, 18.1, 18.3 = ordered dataset
}
is equal to 17.2 NOT 16.5 as in Documentation.

Jonathan Schmalfuß <joscao>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by psa (Posted a comment)
  • -email is unavailable- added by joscao (Submitted the item)
  •  

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-20 psa StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code