import module namespace math="http://www.zorba-xquery.com/modules/math"; math:percentrank((13, 12, 11, 8, 4, 3, 2, 1, 1, 1), 5) (: Expected output: <?xml version="1.0" encoding="UTF-8"?> 0.5833333333333334 :)