spotify/crunch-lib — pull request #4 by DavW (2014-11-18 16:16:31+00:00)
Title: Fix erroneous behaviour in both implementations of Percentiles

Two failure modes were reported:

* The 50th percentile of (10,20,30,40,50,60,70,80,90,100) was calculated to be 60. According to the definition we are following the correct result is 50, because 50% of the data <= 50.

* When multiple percentiles correspond to the same rank, only one was emitted, so there could be a mismatch in the number of percentiles returned compared with the number of percentiles requested.

The former is fixed by more carefully following the rules laid out in the cited wikipedia article. The latter
is fixed by using a multimap instead of a map to store percentiles by index in the computation phase