adapt comparison function to floats