The routine uses the QUICKSORT algorithm to permute an array of
pointers so that they access an associated array of values in
descending order. The ``median of three'' modification is included
to reduce the likelihood of encountering the worst-case behaviour
The routine exists for types REAL (x=R), DOUBLE PRECISION (x=D),
and INTEGER (x=I).