    If the integral is interpreted as a Cauchy principal value, this statement
    holds for `x > 0` and `\operatorname{Ei}(x)` as defined above.

    Note that we carefully avoided defining `\operatorname{Ei}(x)` for
    negative real `x`. This is because above integral formula does not hold for
    any polar lift of such `x`, indeed all branches of
    `\operatorname{Ei}(x)` above the negative reals are imaginary.

    However, the following statement holds for all `x \in \mathbb{R}^*`:

    .. math:: \int_{-\infty}^x \frac{e^t}{t} \mathrm{d}t =
              \frac{\operatorname{Ei}\left(|x|e^{i \arg(x)}\right) +
                    \operatorname{Ei}\left(|x|e^{- i \arg(x)}\right)}{2},

    where the integral is again understood to be a principal value if
    `x > 0`, and `|x|e^{i \arg(x)}`,
    `|x|e^{- i \arg(x)}` denote two conjugate polar lifts of `x`.

    Examples
    ========

    >>> from sympy import Ei, polar_lift, exp_polar, I, pi
    >>> from sympy.abc import x

    The exponential integral in SymPy is strictly undefined for negative values
    of the argument. For convenience, exponential integrals with negative
    arguments are immediately converted into an expression that agrees with
    the classical integral definition:

    >>> Ei(-1)
    -I*pi + Ei(exp_polar(I*pi))

    This yields a real value:

    >>> Ei(-1).n(chop=True)
    -0.219383934395520

    On the other hand the analytic continuation is not real:

    >>> Ei(polar_lift(-1)).n(chop=True)
    -0.21938393439552 + 3.14159265358979*I

    The exponential integral has a logarithmic branch point at the origin:

    >>> Ei(x*exp_polar(2*I*pi))
    Ei(x) + 2*I*pi

    Differentiation is supported:

    >>> Ei(x).diff(x)
    exp(x)/x

    The exponential integral is related to many other special functions.
    For example:

    >>> from sympy import uppergamma, expint, Shi
    >>> Ei(x).rewrite(expint)
    -expint(1, x*exp_polar(I*pi)) - I*pi
    >>> Ei(x).rewrite(Shi)
    Chi(x) + Shi(x)

    See Also
    ========

    expint: Generalised exponential integral.
    E1: Special case of the generalised exponential integral.
    li: Logarithmic integral.
    Li: Offset logarithmic integral.
    Si: Sine integral.
    Ci: Cosine integral.
    Shi: Hyperbolic sine integral.
    Chi: Hyperbolic cosine integral.
    sympy.functions.special.gamma_functions.uppergamma: Upper incomplete gamma function.

    References
    ==========

    .. [1] http://dlmf.nist.gov/6.6
    .. [2] http://en.wikipedia.org/wiki/Exponential_integral
    .. [3] Abramowitz & Stegun, section 5: http://people.math.sfu.ca/~cbm/aands/page_228.htm

    c