Clean up handling of median, by treating it almost like any other
authorBen Pfaff <blp@gnu.org>
Thu, 2 Aug 2007 03:07:17 +0000 (03:07 +0000)
committerBen Pfaff <blp@gnu.org>
Thu, 2 Aug 2007 03:07:17 +0000 (03:07 +0000)
commitddb6ce30f985ce39be0326193ae0bad452307127
tree3cb1af63454a229ae2dba060d73f05b5afd96a6c
parent6270a7f035e14fbad945a148a14d7c1006166eb1
Clean up handling of median, by treating it almost like any other
percentile.  Fixes bug #17424.  Thanks to John Darrington for
review.
* frequencies.q (internal_cmd_frequencies): Fix handling of bit
masks for `stats' variable.  If median is selected, turn it off
and add a 50th percentile.
(add_percentile): Simplify code a little.
(calc_stats): Drop special casing of median.
(dump_statistics): Ditto, except that we label the 50th percentile
as "50 (Median)" to make it clear that it's also the median.
src/language/stats/ChangeLog
src/language/stats/frequencies.q
tests/ChangeLog
tests/command/weight.sh
tests/stats/percentiles-compatible.sh
tests/stats/percentiles-enhanced.sh