rankscore function

compute rank^2 scores and rescale these between 0~1000 (with further precision captured by decimals)