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

All Samples(28)  |  Call(21)  |  Derive(0)  |  Import(7)
The ``loggamma`` function implements the logarithm of the
gamma function i.e, `\log\Gamma(x)`.

Examples
========

>>> from sympy import S, I, pi, oo, loggamma
>>> from sympy.abc import x

The loggamma function obeys the mirror symmetry(more...)

src/s/y/sympy-0.7.5/sympy/functions/special/tests/test_gamma_functions.py   sympy(Download)
from sympy import (
    Symbol, gamma, I, oo, nan, zoo, factorial, sqrt, Rational, log,
    polygamma, EulerGamma, pi, uppergamma, S, expand_func, loggamma, sin,
    cos, O, cancel, lowergamma, exp, erf, beta, exp_polar, harmonic, zeta,
    factorial, conjugate, csc)
 
    # Polygamma of order -1 is loggamma:
    assert polygamma(-1, x) == loggamma(x)
 
    # But smaller orders are iterated integrals and don't have a special name
def test_loggamma():
    raises(TypeError, lambda: loggamma(2, 3))
    raises(ArgumentIndexError, lambda: loggamma(x).fdiff(2))
    assert loggamma(x).diff(x) == polygamma(0, x)
    s1 = loggamma(1/(x + sin(x)) + cos(x)).nseries(x, n=4)
    assert s1 == loggamma(x).rewrite('intractable').series(x)
 
    assert conjugate(loggamma(x)) == loggamma(conjugate(x))
    assert conjugate(loggamma(0)) == conjugate(loggamma(0))
    assert conjugate(loggamma(1)) == loggamma(conjugate(1))

src/s/y/sympy-HEAD/sympy/functions/special/tests/test_gamma_functions.py   sympy(Download)
from sympy import (
    Symbol, gamma, I, oo, nan, zoo, factorial, sqrt, Rational, log,
    polygamma, EulerGamma, pi, uppergamma, S, expand_func, loggamma, sin,
    cos, O, cancel, lowergamma, exp, erf, beta, exp_polar, harmonic, zeta,
    factorial)
 
    # Polygamma of order -1 is loggamma:
    assert polygamma(-1, x) == loggamma(x)
 
    # But smaller orders are iterated integrals and don't have a special name
def test_loggamma():
    raises(TypeError, lambda: loggamma(2, 3))
    raises(ArgumentIndexError, lambda: loggamma(x).fdiff(2))
    assert loggamma(x).diff(x) == polygamma(0, x)
    s1 = loggamma(1/(x + sin(x)) + cos(x)).nseries(x, n=4)

src/s/y/sympy-0.7.5/sympy/series/tests/test_gruntz.py   sympy(Download)
from sympy import Symbol, exp, log, oo, Rational, I, sin, gamma, loggamma, S, \
    atan, acot, pi, cancel, E, erf, sqrt, zeta, cos, digamma, Integer, Ei, EulerGamma
from sympy.functions.elementary.hyperbolic import cosh, coth, sinh, tanh
from sympy.series.gruntz import compare, mrv, rewrite, mrv_leadterm, gruntz, \
    sign
    assert gruntz(exp(exp(digamma(log(x))))/x, x, oo) == exp(-S(1)/2)
    assert gruntz(digamma(digamma(digamma(x))), x, oo) == oo
    assert gruntz(loggamma(loggamma(x)), x, oo) == oo
    assert gruntz(((gamma(x + 1/gamma(x)) - gamma(x))/log(x) - cos(1/x))
                  * x*log(x), x, oo) == -S(1)/2
def test_intractable():
    assert gruntz(1/gamma(x), x, oo) == 0
    assert gruntz(1/loggamma(x), x, oo) == 0
    assert gruntz(gamma(x)/loggamma(x), x, oo) == oo
    assert gruntz(exp(gamma(x))/gamma(x), x, oo) == oo

src/s/y/sympy-HEAD/sympy/series/tests/test_gruntz.py   sympy(Download)
from sympy import Symbol, exp, log, oo, Rational, I, sin, gamma, loggamma, S, \
    atan, acot, pi, cancel, E, erf, sqrt, zeta, cos, digamma, Integer
from sympy.series.gruntz import compare, mrv, rewrite, mrv_leadterm, gruntz, \
    sign
from sympy.utilities.pytest import XFAIL, skip
    assert gruntz(exp(exp(digamma(log(x))))/x, x, oo) == exp(-S(1)/2)
    assert gruntz(digamma(digamma(digamma(x))), x, oo) == oo
    assert gruntz(loggamma(loggamma(x)), x, oo) == oo
    assert gruntz(((gamma(x + 1/gamma(x)) - gamma(x))/log(x) - cos(1/x))
                  * x*log(x), x, oo) == -S(1)/2
def test_intractable():
    assert gruntz(1/gamma(x), x, oo) == 0
    assert gruntz(1/loggamma(x), x, oo) == 0
    assert gruntz(gamma(x)/loggamma(x), x, oo) == oo
    assert gruntz(exp(gamma(x))/gamma(x), x, oo) == oo

src/s/y/sympy-HEAD/sympy/core/tests/test_function.py   sympy(Download)
from sympy import (Lambda, Symbol, Function, Derivative, Subs, sqrt,
        log, exp, Rational, Float, sin, cos, acos, diff, I, re, im,
        E, expand, pi, O, Sum, S, polygamma, loggamma, expint,
        Tuple, Dummy, Eq, Expr, symbols, nfloat)
from sympy.utilities.pytest import XFAIL, raises
    assert loggamma(1/x)._eval_nseries(x, 0, None) == \
        log(x)/2 - log(x)/x - 1/x + O(1, x)
    assert loggamma(log(1/x)).nseries(x, n=1, logx=y) == loggamma(-y)
 
    # issue 3626:

src/s/y/sympy-0.7.5/sympy/functions/special/tests/test_error_functions.py   sympy(Download)
from sympy import (
    symbols, expand, expand_func, nan, oo, Float, conjugate, diff,
    re, im, Abs, O, factorial, exp_polar, polar_lift, gruntz, limit,
    Symbol, I, integrate, S,
    sqrt, sin, cos, sinh, cosh, exp, log, pi, EulerGamma,

src/s/y/sympy-HEAD/sympy/functions/special/tests/test_error_functions.py   sympy(Download)
from sympy import (
    symbols, expand, expand_func, nan, oo, Float, conjugate, diff,
    re, im, Abs, O, factorial, exp_polar, polar_lift, gruntz, limit,
    Symbol, I, integrate, S,
    sqrt, sin, cos, sinh, cosh, exp, log, pi, EulerGamma,