Use logs to calculate ranks (closes #61).