@defun_wrapped
def li(ctx, z, offset=False):
    if offset:
        if z == 2:
            return ctx.zero
        return ctx.ei(ctx.ln2) - ctx.ei(ctx.ln(z))
    if not z:
        return z
    if z == 1:
        return ctx.ninf
    return ctx.ei(ctx.ln(z))
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/functions/expintegrals.py/li/swapped operands of `-`