Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(510)  |  Call(510)  |  Derive(0)  |  Import(0)
Computes the exponential integral `\mathrm{E}_1(z)`, given by

.. math ::

    \mathrm{E}_1(z) = \int_z^{\infty} \frac{e^{-t}}{t} dt.

This is equivalent to :func:`~mpmath.expint` with `n = 1`.

**Examples**
(more...)

src/s/y/sympy-0.7.5/sympy/mpmath/tests/test_fp.py   sympy(Download)
def test_fp_stress_ei_e1():
    # Can be tightened on recent Pythons with more accurate math/cmath
    ATOL = 1e-13
    PTOL = 1e-12
    v = fp.e1(1.1641532182693481445e-10)
    assert ae(v, 22.296641293693077672, tol=ATOL)
    assert type(v) is float
    v = fp.e1(0.25)
    assert ae(v, 1.0442826344437381945, tol=ATOL)
    assert type(v) is float
    v = fp.e1(1.0)
    assert ae(v, 0.21938393439552027368, tol=ATOL)
    assert type(v) is float
    v = fp.e1(2.0)
    assert ae(v, 0.048900510708061119567, tol=ATOL)
    assert type(v) is float
    v = fp.e1(5.0)

src/s/y/sympy-polys-HEAD/sympy/mpmath/tests/test_fp.py   sympy-polys(Download)
def test_fp_stress_ei_e1():
    # Can be tightened on recent Pythons with more accurate math/cmath
    ATOL = 1e-13
    PTOL = 1e-12
    v = fp.e1(1.1641532182693481445e-10)
    assert ae(v, 22.296641293693077672, tol=ATOL)
    assert type(v) is float
    v = fp.e1(0.25)
    assert ae(v, 1.0442826344437381945, tol=ATOL)
    assert type(v) is float
    v = fp.e1(1.0)
    assert ae(v, 0.21938393439552027368, tol=ATOL)
    assert type(v) is float
    v = fp.e1(2.0)
    assert ae(v, 0.048900510708061119567, tol=ATOL)
    assert type(v) is float
    v = fp.e1(5.0)

src/s/y/sympy-HEAD/sympy/mpmath/tests/test_fp.py   sympy(Download)
def test_fp_stress_ei_e1_1():
    # Can be tightened on recent Pythons with more accurate math/cmath
    ATOL = 1e-13
    PTOL = 1e-12
    v = fp.e1(1.1641532182693481445e-10)
    assert ae(v, 22.296641293693077672, tol=ATOL)
    assert type(v) is float
    v = fp.e1(0.25)
    assert ae(v, 1.0442826344437381945, tol=ATOL)
    assert type(v) is float
    v = fp.e1(1.0)
    assert ae(v, 0.21938393439552027368, tol=ATOL)
    assert type(v) is float
    v = fp.e1(2.0)
    assert ae(v, 0.048900510708061119567, tol=ATOL)
    assert type(v) is float
    v = fp.e1(5.0)