Fixing float conversions in test_rank()