added improved accuracy in binary search of ml_gap. This function now
returns a float.