URL: <https://savannah.gnu.org/bugs/?58202>
Summary: Wrong Result Median for gsl_rstat_quantile_get with fix Project: GNU Scientific Library Submitted by: joscao Submitted on: Sat 18 Apr 2020 06:26:00 PM UTC Category: Documentation Severity: 3 - Normal Operating System: Ubuntu 18.04.4 LTS Status: None Assigned to: None Open/Closed: Open Release: 12.6 Discussion Lock: Any _______________________________________________________ Details: 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. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?58202> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/