quantile

Estimate the q-quantile (q in [0, 1]) of all recorded values.

Walks the buckets in ascending value order (negative store by descending index, then zeros, then positive store by ascending index) to rank ⌊q·(count−1)⌋ and returns that bucket's representative — which is within relative error relativeAccuracy of the exact quantile, provided the exact quantile's magnitude lies within the indexable range. quantile(0.0) is the minimum estimate, quantile(1.0) the maximum.

Throws

if q is outside [0, 1] or the sketch is empty.