def logadd(x, y):
    """Adds two log values.
    
    Ensures accuracy even when the difference between values is large.
    
    """
    if x < y:
        temp = x
        x = y
        y = temp

    z = math.exp(y - x)
    logProb = x + math.log(1.0 + z)
    if _MinLogExp < logProb:
        return _MinLogExp
    else:
        return logProb
dataset/ETHPy150Open abhik/pebl/src/pebl/util.py/logadd/swapped operands of `<`