46 if (is_exactly_a<numeric>(
x)) {
48 return lgamma(ex_to<numeric>(
x));
49 }
catch (
const dunno &e) { }
69 throw (
pole_error(
"lgamma_eval(): logarithmic pole",0));
72 return lgamma(ex_to<numeric>(
x));
105 numeric m = -ex_to<numeric>(arg_pt);
120 if (is_exactly_a<numeric>(
x) &&
124 return conjugate_function(
lgamma(
x)).hold();
133 latex_name(
"\\log \\Gamma"));
142 if (is_exactly_a<numeric>(
x)) {
144 return tgamma(ex_to<numeric>(
x));
145 }
catch (
const dunno &e) { }
161 const numeric two_x = (*_num2_p)*ex_to<numeric>(
x);
167 throw (
pole_error(
"tgamma_eval(): simple pole",1));
185 return tgamma(ex_to<numeric>(
x));
218 const numeric m = -ex_to<numeric>(arg_pt);
238 latex_name(
"\\Gamma"));
247 if (is_exactly_a<numeric>(
x) && is_exactly_a<numeric>(y)) {
250 }
catch (
const dunno &e) { }
253 return beta(
x,y).hold();
267 const numeric &nx = ex_to<numeric>(
x);
268 const numeric &ny = ex_to<numeric>(y);
275 throw (
pole_error(
"beta_eval(): simple pole",1));
281 throw (
pole_error(
"beta_eval(): simple pole",1));
291 return evalf(beta(
x, y).hold());
294 return beta(
x,y).hold();
308 retval = (
psi(y)-
psi(
x+y))*beta(
x,y);
326 const symbol &s = ex_to<symbol>(rel.
lhs());
327 ex arg1_ser, arg2_ser, arg1arg2_ser;
333 arg1_ser =
tgamma(arg1+s);
338 arg2_ser =
tgamma(arg2+s);
343 arg1arg2_ser =
tgamma(arg2+arg1+s);
345 arg1arg2_ser =
tgamma(arg2+arg1);
347 return (arg1_ser*arg2_ser/arg1arg2_ser).series(rel,
order,
options).expand();
355 latex_name(
"\\mathrm{B}").
365 if (is_exactly_a<numeric>(
x)) {
367 return psi(ex_to<numeric>(
x));
368 }
catch (
const dunno &e) { }
379 const numeric &nx = ex_to<numeric>(
x);
390 throw (
pole_error(
"psi_eval(): simple pole",1));
444 const numeric m = -ex_to<numeric>(arg_pt);
466 if (is_exactly_a<numeric>(
n) && is_exactly_a<numeric>(
x)) {
468 return psi(ex_to<numeric>(
n),ex_to<numeric>(
x));
469 }
catch (
const dunno &e) { }
487 const numeric &nn = ex_to<numeric>(
n);
488 const numeric &nx = ex_to<numeric>(
x);
516 const numeric m = nx - (*_num1_2_p);
544 if (deriv_param==0) {
546 throw(std::logic_error(
"cannot diff psi(n,x) with respect to n"));
571 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.
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.
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)
REGISTER_FUNCTION(conjugate_function, eval_func(conjugate_eval). evalf_func(conjugate_evalf). expl_derivative_func(conjugate_expl_derivative). info_func(conjugate_info). print_func< print_latex >(conjugate_print_latex). conjugate_func(conjugate_conjugate). real_part_func(conjugate_real_part). imag_part_func(conjugate_imag_part). set_name("conjugate","conjugate"))
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...