fix greedy_ratio by using floats