45 if (is_exactly_a<numeric>(
x)) {
47 return lgamma(ex_to<numeric>(
x));
48 }
catch (
const dunno &e) { }
68 throw (
pole_error(
"lgamma_eval(): logarithmic pole",0));
71 return lgamma(ex_to<numeric>(
x));
104 numeric m = -ex_to<numeric>(arg_pt);
119 if (is_exactly_a<numeric>(
x) &&
123 return conjugate_function(
lgamma(
x)).hold();
132 latex_name(
"\\log \\Gamma"));
141 if (is_exactly_a<numeric>(
x)) {
143 return tgamma(ex_to<numeric>(
x));
144 }
catch (
const dunno &e) { }
160 const numeric two_x = (*_num2_p)*ex_to<numeric>(
x);
166 throw (
pole_error(
"tgamma_eval(): simple pole",1));
184 return tgamma(ex_to<numeric>(
x));
217 const numeric m = -ex_to<numeric>(arg_pt);
237 latex_name(
"\\Gamma"));
246 if (is_exactly_a<numeric>(
x) && is_exactly_a<numeric>(y)) {
249 }
catch (
const dunno &e) { }
252 return beta(
x,y).hold();
266 const numeric &nx = ex_to<numeric>(
x);
267 const numeric &ny = ex_to<numeric>(y);
274 throw (
pole_error(
"beta_eval(): simple pole",1));
280 throw (
pole_error(
"beta_eval(): simple pole",1));
290 return evalf(beta(
x, y).hold());
293 return beta(
x,y).hold();
307 retval = (
psi(y)-
psi(
x+y))*beta(
x,y);
325 const symbol &s = ex_to<symbol>(rel.
lhs());
326 ex arg1_ser, arg2_ser, arg1arg2_ser;
332 arg1_ser =
tgamma(arg1+s);
337 arg2_ser =
tgamma(arg2+s);
342 arg1arg2_ser =
tgamma(arg2+arg1+s);
344 arg1arg2_ser =
tgamma(arg2+arg1);
346 return (arg1_ser*arg2_ser/arg1arg2_ser).series(rel,
order,
options).expand();
354 latex_name(
"\\mathrm{B}").
364 if (is_exactly_a<numeric>(
x)) {
366 return psi(ex_to<numeric>(
x));
367 }
catch (
const dunno &e) { }
378 const numeric &nx = ex_to<numeric>(
x);
389 throw (
pole_error(
"psi_eval(): simple pole",1));
443 const numeric m = -ex_to<numeric>(arg_pt);
465 if (is_exactly_a<numeric>(
n) && is_exactly_a<numeric>(
x)) {
467 return psi(ex_to<numeric>(
n),ex_to<numeric>(
x));
468 }
catch (
const dunno &e) { }
486 const numeric &nn = ex_to<numeric>(
n);
487 const numeric &nx = ex_to<numeric>(
x);
515 const numeric m = nx - (*_num1_2_p);
543 if (deriv_param==0) {
545 throw(std::logic_error(
"cannot diff psi(n,x) with respect to n"));
570 const numeric m = -ex_to<numeric>(arg_pt);
#define GINAC_ASSERT(X)
Assertion macro for checking invariances.
const basic & hold() const
Stop further evaluation.
virtual ex series(const relational &r, int order, unsigned options=0) const
Default implementation of ex::series().
Exception class thrown by classes which provide their own series expansion to signal that ordinary Ta...
Exception class thrown by functions to signal unimplemented functionality so the expression may just ...
Lightweight wrapper for GiNaC's symbolic objects.
bool is_equal(const ex &other) const
ex series(const ex &r, int order, unsigned options=0) const
Compute the truncated series expansion of an expression.
ex subs(const exmap &m, unsigned options=0) const
bool info(unsigned inf) const
static unsigned register_new(function_options const &opt)
This class is a wrapper around CLN-numbers within the GiNaC class hierarchy.
const numeric sub(const numeric &other) const
Numerical subtraction method.
bool is_positive() const
True if object is not complex and greater than zero.
bool is_real() const
True if object is a real integer, rational or float (but not complex).
bool is_integer() const
True if object is a non-complex integer.
bool is_negative() const
True if object is not complex and less than zero.
bool is_even() const
True if object is an exact even integer.
bool is_equal(const numeric &other) const
const numeric inverse() const
Inverse of a number.
const numeric div(const numeric &other) const
Numerical division method.
Exception class thrown when a singularity is encountered.
This class holds a two-component object, a basis and and exponent representing exponentiation.
ex series(const relational &s, int order, unsigned options=0) const override
Implementation of ex::series() for powers.
This class holds a relation consisting of two expressions and a logical relation between them.
@ no_pattern
disable pattern matching
Interface to GiNaC's constant types and some special constants.
#define REGISTER_FUNCTION(NAME, OPT)
Interface to GiNaC's initially known functions.
static ex lgamma_deriv(const ex &x, unsigned deriv_param)
const numeric pow(const numeric &x, const numeric &y)
static ex beta_series(const ex &arg1, const ex &arg2, const relational &rel, int order, unsigned options)
const numeric abs(const numeric &x)
Absolute value.
const constant Euler("Euler", EulerEvalf, "\\gamma_E", domain::positive)
Euler's constant.
const numeric * _num1_2_p
function zeta(const T1 &p1)
const numeric doublefactorial(const numeric &n)
The double factorial combinatorial function.
static ex lgamma_eval(const ex &x)
Evaluation of lgamma(x), the natural logarithm of the Gamma function.
bool is_rational(const numeric &x)
static ex psi2_eval(const ex &n, const ex &x)
Evaluation of polygamma-function psi(n,x).
static ex beta_deriv(const ex &x, const ex &y, unsigned deriv_param)
function psi(const T1 &p1)
const numeric sqrt(const numeric &x)
Numeric square root.
const cln::cl_N tgamma(const cln::cl_N &x)
static ex psi1_eval(const ex &x)
Evaluation of digamma-function psi(x).
static ex tgamma_deriv(const ex &x, unsigned deriv_param)
const numeric exp(const numeric &x)
Exponential function.
const numeric factorial(const numeric &n)
Factorial combinatorial function.
static ex beta_eval(const ex &x, const ex &y)
const constant Pi("Pi", PiEvalf, "\\pi", domain::positive)
Pi.
static ex tgamma_evalf(const ex &x)
static ex psi2_deriv(const ex &n, const ex &x, unsigned deriv_param)
const numeric log(const numeric &x)
Natural logarithm.
ex evalf(const ex &thisex)
static ex tgamma_eval(const ex &x)
Evaluation of tgamma(x), the true Gamma function.
bool is_real(const numeric &x)
static ex lgamma_series(const ex &arg, const relational &rel, int order, unsigned options)
static ex lgamma_conjugate(const ex &x)
static ex tgamma_conjugate(const ex &x)
static ex psi1_deriv(const ex &x, unsigned deriv_param)
bool is_integer(const numeric &x)
static ex psi2_series(const ex &n, const ex &arg, const relational &rel, int order, unsigned options)
static ex psi2_evalf(const ex &n, const ex &x)
static ex psi1_evalf(const ex &x)
static ex beta_evalf(const ex &x, const ex &y)
const cln::cl_N lgamma(const cln::cl_N &x)
The Gamma function.
static ex lgamma_evalf(const ex &x)
bool is_positive(const numeric &x)
static ex tgamma_series(const ex &arg, const relational &rel, int order, unsigned options)
static ex psi1_series(const ex &arg, const relational &rel, int order, unsigned options)
Makes the interface to the underlying bignum package available.
Interface to GiNaC's overloaded operators.
Interface to GiNaC's symbolic exponentiation (basis^exponent).
Interface to class for extended truncated power series.
Interface to relations between expressions.
Interface to GiNaC's symbolic objects.
Interface to GiNaC's symmetry definitions.
Interface to several small and furry utilities needed within GiNaC but not of any interest to the use...