No div by zero (NaN) in gap func.