European Parliament MCP Server API - v1.3.9
    Preparing search index...
    • Compute a percentile using nearest-rank with Math.ceil.

      Deterministic and tie-stable: identical fixture sets produce identical percentiles regardless of insertion order. Inputs are always sorted before the percentile rank is read so the return value is consistent for all inputs in the documented range.

      Parameters

      • values: readonly number[]

        Numeric samples

      • percentile: number

        Percentile in the range [0, 100]. Values ≤ 0 return the minimum (sorted[0]); values ≥ 100 return the maximum.

      Returns number

      The percentile value, or 0 for empty inputs