Gamma, GammaNum
,
Zeta, ZetaNum
,
Bernoulli, BernoulliArray
.
Special functions
In this chapter, special and transcendental mathematical functions are described.
Gamma, GammaNum -- Euler's Gamma function
Standard library
Calling format:
Gamma(x)
GammaNum(number)
|
Parameters:
x -- expression
number -- expression that can be evaluated to a number
Description:
Gamma(x) is an interface to Euler's Gamma function Gamma(x). It returns exact values on integer and half-integer arguments. GammaNum(x) or equivalently N(Gamma(x) takes a numeric parameter and always returns a floating-point number in the current precision.
Examples:
In> Precision(30)
Out> True;
In> Gamma(1.3)
Out> Gamma(1.3);
In> N(%)
Out> 0.897470696306277188493754954771;
In> Gamma(1.5)
Out> Sqrt(Pi)/2;
In> GammaNum(1.5);
Out> 0.88622692545275801364908374167;
|
See also:
!
,
N
.
Zeta, ZetaNum -- Riemann's Zeta function
Standard library
Calling format:
Parameters:
x -- expression
number -- expression that can be evaluated to a number
Description:
Zeta(x) is an interface to Riemann's Zeta function zeta(s). It returns exact values on integer and half-integer arguments. ZetaNum(x) or equivalently N(Zeta(x) takes a numeric parameter and always returns a floating-point number in the current precision.
Examples:
In> Precision(30)
Out> True;
In> Zeta(1)
Out> Infinity;
In> Zeta(1.3)
Out> Zeta(1.3);
In> N(%)
Out> 3.93194921180954422697490751058798;
In> Zeta(2)
Out> Pi^2/6;
In> ZetaNum(2);
Out> 1.64493406684822643647241516664602;
|
See also:
!
,
N
.
Bernoulli, BernoulliArray -- Bernoulli numbers and polynomials
Standard library
Calling format:
Bernoulli(index)
BernoulliArray(index)
Bernoulli(index, x)
|
Parameters:
x -- expression that will be the variable in the polynomial
index -- expression that can be evaluated to an integer
Description:
Bernoulli(n) evaluates the n-th Bernoulli number. Bernoulli(n, x) returns the n-th Bernoulli polynomial in the variable x. The polynomial is returned in the Horner form.
An auxiliary function BernoulliArray(n) might be useful too: it returns an array (of type GenericArray) of Bernoulli numbers up to n. The array is 1-based, so that the n-th Bernoulli number is BernoulliArray(n)[n+1].
Example:
In> Bernoulli(20);
Out> -174611/330;
In> Bernoulli(4, x);
Out> ((x-2)*x+1)*x^2-1/30;
|
See also:
Gamma
,
Zeta
.