Added alternate rank formulas for #nearest_rank calculation