import module namespace
math="http://www.zorba-xquery.com/modules/math";

math:percentrank((13, 12, 11, 8, 4, 3, 2, 1, 1, 1), 8)


(:

Expected output:

<?xml version="1.0" encoding="UTF-8"?>
0.6666666666666666

                
:)