5.12.1 Overview
GiNaC contains the following predefined mathematical functions:
Name | Function
|
abs(x)
| absolute value
|
step(x)
| step function
|
csgn(x)
| complex sign
|
conjugate(x)
| complex conjugation
|
real_part(x)
| real part
|
imag_part(x)
| imaginary part
|
sqrt(x)
| square root (not a GiNaC function, rather an alias for pow(x, numeric(1, 2)) )
|
sin(x)
| sine
|
cos(x)
| cosine
|
tan(x)
| tangent
|
asin(x)
| inverse sine
|
acos(x)
| inverse cosine
|
atan(x)
| inverse tangent
|
atan2(y, x)
| inverse tangent with two arguments
|
sinh(x)
| hyperbolic sine
|
cosh(x)
| hyperbolic cosine
|
tanh(x)
| hyperbolic tangent
|
asinh(x)
| inverse hyperbolic sine
|
acosh(x)
| inverse hyperbolic cosine
|
atanh(x)
| inverse hyperbolic tangent
|
exp(x)
| exponential function
|
log(x)
| natural logarithm
|
Li2(x)
| dilogarithm
|
Li(m, x)
| classical polylogarithm as well as multiple polylogarithm
|
G(a, y)
| multiple polylogarithm
|
G(a, s, y)
| multiple polylogarithm with explicit signs for the imaginary parts
|
S(n, p, x)
| Nielsen's generalized polylogarithm
|
H(m, x)
| harmonic polylogarithm
|
zeta(m)
| Riemann's zeta function as well as multiple zeta value
|
zeta(m, s)
| alternating Euler sum
|
zetaderiv(n, x)
| derivatives of Riemann's zeta function
|
tgamma(x)
| gamma function
|
lgamma(x)
| logarithm of gamma function
|
beta(x, y)
| beta function (tgamma(x)*tgamma(y)/tgamma(x+y) )
|
psi(x)
| psi (digamma) function
|
psi(n, x)
| derivatives of psi function (polygamma functions)
|
factorial(n)
| factorial function n!
|
binomial(n, k)
| binomial coefficients
|
Order(x)
| order term function in truncated power series
|
|
For functions that have a branch cut in the complex plane GiNaC follows
the conventions for C++ as defined in the ANSI standard as far as
possible. In particular: the natural logarithm (log
) and the
square root (sqrt
) both have their branch cuts running along the
negative real axis where the points on the axis itself belong to the
upper part (i.e. continuous with quadrant II). The inverse
trigonometric and hyperbolic functions are not defined for complex
arguments by the C++ standard, however. In GiNaC we follow the
conventions used by CLN, which in turn follow the carefully designed
definitions in the Common Lisp standard. It should be noted that this
convention is identical to the one used by the C99 standard and by most
serious CAS. It is to be expected that future revisions of the C++
standard incorporate these functions in the complex domain in a manner
compatible with C99.