How to compute percentile for an external element with given array?
How to compute percentile for an external element with given array? Question: I’m looking for a percentile function that accepts an array and an element where it would return closest percentile of the element. Some examples percentile([1,2,3,4,5], 2) => 40% percentile([1,2,3,4,5], 2.5) => 40% percentile([1,2,3,4,5], 6) => 100% Does anything like this or similar exist …