def cond(state):
    (low, high) = state
    midpoint = (0.5 * (low + high))
    return ((low < midpoint) & (midpoint < high))
def cond(state):
    (low, high) = state
    midpoint = (0.5 * (low + high))
    return ((low < midpoint) & (midpoint < high))