| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter describes the GSL special function library. The library includes routines for calculating the values of Airy functions, Bessel functions, Clausen functions, Coulomb wave functions, Coupling coefficients, the Dawson function, Debye functions, Dilogarithms, Elliptic integrals, Jacobi elliptic functions, Error functions, Exponential integrals, Fermi-Dirac functions, Gamma functions, Gegenbauer functions, Hypergeometric functions, Laguerre functions, Legendre functions and Spherical Harmonics, the Psi (Digamma) Function, Synchrotron functions, Transport functions, Trigonometric functions and Zeta functions. Each routine also computes an estimate of the numerical error in the calculated value of the function.
The functions in this chapter are declared in individual header files, such as ‘gsl_sf_airy.h’, ‘gsl_sf_bessel.h’, etc. The complete set of header files can be included using the file ‘gsl_sf.h’.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The special functions are available in two calling conventions, a natural form which returns the numerical value of the function and an error-handling form which returns an error code. The two types of function provide alternative ways of accessing the same underlying code.
The natural form returns only the value of the function and can be
used directly in mathematical expressions. For example, the following
function call will compute the value of the Bessel function
,
double y = gsl_sf_bessel_J0 (x); |
There is no way to access an error code or to estimate the error using this method. To allow access to this information the alternative error-handling form stores the value and error in a modifiable argument,
gsl_sf_result result; int status = gsl_sf_bessel_J0_e (x, &result); |
The error-handling functions have the suffix _e. The returned
status value indicates error conditions such as overflow, underflow or
loss of precision. If there are no errors the error-handling functions
return GSL_SUCCESS.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The error handling form of the special functions always calculate an error estimate along with the value of the result. Therefore, structures are provided for amalgamating a value and error estimate. These structures are declared in the header file ‘gsl_sf_result.h’.
The gsl_sf_result struct contains value and error fields.
typedef struct
{
double val;
double err;
} gsl_sf_result;
|
The field val contains the value and the field err contains an estimate of the absolute error in the value.
In some cases, an overflow or underflow can be detected and handled by a
function. In this case, it may be possible to return a scaling exponent
as well as an error/value pair in order to save the result from
exceeding the dynamic range of the built-in types. The
gsl_sf_result_e10 struct contains value and error fields as well
as an exponent field such that the actual result is obtained as
result * 10^(e10).
typedef struct
{
double val;
double err;
int e10;
} gsl_sf_result_e10;
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The goal of the library is to achieve double precision accuracy wherever
possible. However the cost of evaluating some special functions to
double precision can be significant, particularly where very high order
terms are required. In these cases a mode argument allows the
accuracy of the function to be reduced in order to improve performance.
The following precision levels are available for the mode argument,
GSL_PREC_DOUBLEDouble-precision, a relative accuracy of approximately
.
GSL_PREC_SINGLESingle-precision, a relative accuracy of approximately
.
GSL_PREC_APPROXApproximate values, a relative accuracy of approximately
.
The approximate mode provides the fastest evaluation at the lowest accuracy.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Airy functions
and
are defined by the
integral representations,
For further information see Abramowitz & Stegun, Section 10.4. The Airy
functions are defined in the header file ‘gsl_sf_airy.h’.
| 7.4.1 Airy Functions | ||
| 7.4.2 Derivatives of Airy Functions | ||
| 7.4.3 Zeros of Airy Functions | ||
| 7.4.4 Zeros of Derivatives of Airy Functions |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Airy function
with an accuracy
specified by mode.
These routines compute the Airy function
with an accuracy
specified by mode.
These routines compute a scaled version of the Airy function
. For
the scaling factor
is
,
and is 1
for
.
These routines compute a scaled version of the Airy function
. For
the scaling factor
is
, and is 1 for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Airy function derivative
with
an accuracy specified by mode.
These routines compute the Airy function derivative
with
an accuracy specified by mode.
These routines compute the scaled Airy function derivative
.
For
the scaling factor
is
, and is 1 for
.
These routines compute the scaled Airy function derivative
.
For
the scaling factor
is
, and is 1 for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the location of the s-th zero of the Airy
function
.
These routines compute the location of the s-th zero of the Airy
function
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the location of the s-th zero of the Airy
function derivative
.
These routines compute the location of the s-th zero of the Airy
function derivative
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The routines described in this section compute the Cylindrical Bessel
functions
,
, Modified cylindrical Bessel
functions
,
, Spherical Bessel functions
,
, and Modified Spherical Bessel functions
,
. For more information see Abramowitz & Stegun,
Chapters 9 and 10. The Bessel functions are defined in the header file
‘gsl_sf_bessel.h’.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the regular cylindrical Bessel function of zeroth
order,
.
These routines compute the regular cylindrical Bessel function of first
order,
.
These routines compute the regular cylindrical Bessel function of
order n,
.
This routine computes the values of the regular cylindrical Bessel
functions
for
from nmin to nmax
inclusive, storing the results in the array result_array. The
values are computed using recurrence relations for efficiency, and
therefore may differ slightly from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the irregular cylindrical Bessel function of zeroth
order,
, for
.
These routines compute the irregular cylindrical Bessel function of first
order,
, for
.
These routines compute the irregular cylindrical Bessel function of
order n,
, for
.
This routine computes the values of the irregular cylindrical Bessel
functions
for
from nmin to nmax
inclusive, storing the results in the array result_array. The
domain of the function is
. The values are computed using
recurrence relations for efficiency, and therefore may differ slightly
from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the regular modified cylindrical Bessel function
of zeroth order,
.
These routines compute the regular modified cylindrical Bessel function
of first order,
.
These routines compute the regular modified cylindrical Bessel function
of order n,
.
This routine computes the values of the regular modified cylindrical
Bessel functions
for
from nmin to
nmax inclusive, storing the results in the array
result_array. The start of the range nmin must be positive
or zero. The values are computed using recurrence relations for
efficiency, and therefore may differ slightly from the exact values.
These routines compute the scaled regular modified cylindrical Bessel
function of zeroth order
.
These routines compute the scaled regular modified cylindrical Bessel
function of first order
.
These routines compute the scaled regular modified cylindrical Bessel
function of order n,
This routine computes the values of the scaled regular cylindrical
Bessel functions
for
from
nmin to nmax inclusive, storing the results in the array
result_array. The start of the range nmin must be positive
or zero. The values are computed using recurrence relations for
efficiency, and therefore may differ slightly from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the irregular modified cylindrical Bessel
function of zeroth order,
, for
.
These routines compute the irregular modified cylindrical Bessel
function of first order,
, for
.
These routines compute the irregular modified cylindrical Bessel
function of order n,
, for
.
This routine computes the values of the irregular modified cylindrical
Bessel functions
for
from nmin to
nmax inclusive, storing the results in the array
result_array. The start of the range nmin must be positive
or zero. The domain of the function is
. The values are
computed using recurrence relations for efficiency, and therefore
may differ slightly from the exact values.
These routines compute the scaled irregular modified cylindrical Bessel
function of zeroth order
for
.
These routines compute the scaled irregular modified cylindrical Bessel
function of first order
for
.
These routines compute the scaled irregular modified cylindrical Bessel
function of order n,
, for
.
This routine computes the values of the scaled irregular cylindrical
Bessel functions
for
from nmin to
nmax inclusive, storing the results in the array
result_array. The start of the range nmin must be positive
or zero. The domain of the function is
. The values are
computed using recurrence relations for efficiency, and therefore
may differ slightly from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the regular spherical Bessel function of zeroth
order,
.
These routines compute the regular spherical Bessel function of first
order,
.
These routines compute the regular spherical Bessel function of second
order,
.
These routines compute the regular spherical Bessel function of
order l,
, for
and
.
This routine computes the values of the regular spherical Bessel
functions
for
from 0 to lmax
inclusive for
and
, storing the results in the array result_array.
The values are computed using recurrence relations for
efficiency, and therefore may differ slightly from the exact values.
This routine uses Steed's method to compute the values of the regular
spherical Bessel functions
for
from 0 to
lmax inclusive for
and
, storing the results in the array
result_array.
The Steed/Barnett algorithm is described in Comp. Phys. Comm. 21,
297 (1981). Steed's method is more stable than the
recurrence used in the other functions but is also slower.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the irregular spherical Bessel function of zeroth
order,
.
These routines compute the irregular spherical Bessel function of first
order,
.
These routines compute the irregular spherical Bessel function of second
order,
.
These routines compute the irregular spherical Bessel function of
order l,
, for
.
This routine computes the values of the irregular spherical Bessel
functions
for
from 0 to lmax
inclusive for
, storing the results in the array result_array.
The values are computed using recurrence relations for
efficiency, and therefore may differ slightly from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The regular modified spherical Bessel functions
are related to the modified Bessel functions of fractional order,
These routines compute the scaled regular modified spherical Bessel
function of zeroth order,
.
These routines compute the scaled regular modified spherical Bessel
function of first order,
.
These routines compute the scaled regular modified spherical Bessel
function of second order,
These routines compute the scaled regular modified spherical Bessel
function of order l,
This routine computes the values of the scaled regular modified
cylindrical Bessel functions
for
from
0 to lmax inclusive for
, storing the results in
the array result_array.
The values are computed using recurrence relations for
efficiency, and therefore may differ slightly from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The irregular modified spherical Bessel functions
are related to the irregular modified Bessel functions of fractional order,
.
These routines compute the scaled irregular modified spherical Bessel
function of zeroth order,
, for
.
These routines compute the scaled irregular modified spherical Bessel
function of first order,
, for
.
These routines compute the scaled irregular modified spherical Bessel
function of second order,
, for
.
These routines compute the scaled irregular modified spherical Bessel
function of order l,
, for
.
This routine computes the values of the scaled irregular modified
spherical Bessel functions
for
from
0 to lmax inclusive for
and
, storing the results in
the array result_array.
The values are computed using recurrence relations for
efficiency, and therefore may differ slightly from the exact values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the regular cylindrical Bessel function of
fractional order
,
.
This function computes the regular cylindrical Bessel function of
fractional order
,
, evaluated at a series of
values. The array v of length size contains the
values. They are assumed to be strictly ordered and positive.
The array is over-written with the values of
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the irregular cylindrical Bessel function of
fractional order
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the regular modified Bessel function of
fractional order
,
for
,
.
These routines compute the scaled regular modified Bessel function of
fractional order
,
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the irregular modified Bessel function of
fractional order
,
for
,
.
These routines compute the logarithm of the irregular modified Bessel
function of fractional order
,
for
,
.
These routines compute the scaled irregular modified Bessel function of
fractional order
,
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the location of the s-th positive zero of
the Bessel function
.
These routines compute the location of the s-th positive zero of
the Bessel function
.
These routines compute the location of the s-th positive zero of
the Bessel function
. The current implementation does not
support negative values of nu.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Clausen function is defined by the following integral,
It is related to the dilogarithm by
.
The Clausen functions are declared in the header file
‘gsl_sf_clausen.h’.
These routines compute the Clausen integral
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The prototypes of the Coulomb functions are declared in the header file ‘gsl_sf_coulomb.h’. Both bound state and scattering solutions are available.
| 7.7.1 Normalized Hydrogenic Bound States | ||
| 7.7.2 Coulomb Wave Functions | ||
| 7.7.3 Coulomb Wave Function Normalization Constant |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the lowest-order normalized hydrogenic bound
state radial wavefunction
.
These routines compute the n-th normalized hydrogenic bound state
radial wavefunction,
where
is the generalized Laguerre polynomial (see section Laguerre Functions).
The normalization is chosen such that the wavefunction
is
given by
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Coulomb wave functions
,
are
described in Abramowitz & Stegun, Chapter 14. Because there can be a
large dynamic range of values for these functions, overflows are handled
gracefully. If an overflow occurs, GSL_EOVRFLW is signalled and
exponent(s) are returned through the modifiable parameters exp_F,
exp_G. The full solution can be reconstructed from the following
relations,
This function computes the Coulomb wave functions
,
and their derivatives
,
with respect to
. The parameters are restricted to
,
and integer
. Note that
itself is not restricted to being an integer. The results are stored in
the parameters F, G for the function values and Fp,
Gp for the derivative values. If an overflow occurs,
GSL_EOVRFLW is returned and scaling exponents are stored in
the modifiable parameters exp_F, exp_G.
This function computes the Coulomb wave function
for
, storing the results in fc_array.
In the case of overflow the exponent is stored in F_exponent.
This function computes the functions
,
for
storing the
results in fc_array and gc_array. In the case of overflow the
exponents are stored in F_exponent and G_exponent.
This function computes the functions
,
and their derivatives
,
for
storing the
results in fc_array, gc_array, fcp_array and gcp_array.
In the case of overflow the exponents are stored in F_exponent
and G_exponent.
This function computes the Coulomb wave function divided by the argument
for
, storing the
results in fc_array. In the case of overflow the exponent is
stored in F_exponent. This function reduces to spherical Bessel
functions in the limit
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Coulomb wave function normalization constant is defined in Abramowitz 14.1.7.
This function computes the Coulomb wave function normalization constant
for
.
This function computes the Coulomb wave function normalization constant
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Wigner 3-j, 6-j and 9-j symbols give the coupling coefficients for combined angular momentum vectors. Since the arguments of the standard coupling coefficient functions are integer or half-integer, the arguments of the following functions are, by convention, integers equal to twice the actual spin value. For information on the 3-j coefficients see Abramowitz & Stegun, Section 27.9. The functions described in this section are declared in the header file ‘gsl_sf_coupling.h’.
| 7.8.1 3-j Symbols | ||
| 7.8.2 6-j Symbols | ||
| 7.8.3 9-j Symbols |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Wigner 3-j coefficient,
where the arguments are given in half-integer units,
=
two_ja/2,
= two_ma/2, etc.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Wigner 6-j coefficient,
where the arguments are given in half-integer units,
=
two_ja/2,
= two_ma/2, etc.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Wigner 9-j coefficient,
where the arguments are given in half-integer units,
=
two_ja/2,
= two_ma/2, etc.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Dawson integral is defined by
. A table of Dawson's integral can be found in Abramowitz &
Stegun, Table 7.5. The Dawson functions are declared in the header file
‘gsl_sf_dawson.h’.
These routines compute the value of Dawson's integral for x.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Debye functions
are defined by the following integral,
For further information see Abramowitz &
Stegun, Section 27.1. The Debye functions are declared in the header
file ‘gsl_sf_debye.h’.
These routines compute the first-order Debye function
.
These routines compute the second-order Debye function
.
These routines compute the third-order Debye function
.
These routines compute the fourth-order Debye function
.
These routines compute the fifth-order Debye function
.
These routines compute the sixth-order Debye function
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described in this section are declared in the header file ‘gsl_sf_dilog.h’.
| 7.11.1 Real Argument | ||
| 7.11.2 Complex Argument |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the dilogarithm for a real argument. In Lewin's
notation this is
, the real part of the dilogarithm of a
real
. It is defined by the integral representation
.
Note that
for
, and
for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This function computes the full complex-valued dilogarithm for the
complex argument
. The real and imaginary
parts of the result are returned in result_re, result_im.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following functions allow for the propagation of errors when combining quantities by multiplication. The functions are declared in the header file ‘gsl_sf_elementary.h’.
This function multiplies x and y storing the product and its associated error in result.
This function multiplies x and y with associated absolute
errors dx and dy. The product
is stored in result.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described in this section are declared in the header file ‘gsl_sf_ellint.h’. Further information about the elliptic integrals can be found in Abramowitz & Stegun, Chapter 17.
| 7.13.1 Definition of Legendre Forms | ||
| 7.13.2 Definition of Carlson Forms | ||
| 7.13.3 Legendre Form of Complete Elliptic Integrals | ||
| 7.13.4 Legendre Form of Incomplete Elliptic Integrals | ||
| 7.13.5 Carlson Forms |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Legendre forms of elliptic integrals
,
and
are defined by,
The complete Legendre forms are denoted by
and
.
The notation used here is based on Carlson, Numerische
Mathematik 33 (1979) 1 and differs slightly from that used by
Abramowitz & Stegun, where the functions are given in terms of the
parameter
and
is replaced by
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Carlson symmetric forms of elliptical integrals
,
,
and
are defined
by,
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the complete elliptic integral
to
the accuracy specified by the mode variable mode.
Note that Abramowitz & Stegun define this function in terms of the
parameter
.
These routines compute the complete elliptic integral
to the
accuracy specified by the mode variable mode.
Note that Abramowitz & Stegun define this function in terms of the
parameter
.
These routines compute the complete elliptic integral
to the
accuracy specified by the mode variable mode.
Note that Abramowitz & Stegun define this function in terms of the
parameters
and
, with the
change of sign
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
Note that Abramowitz & Stegun define this function in terms of the
parameter
.
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
Note that Abramowitz & Stegun define this function in terms of the
parameter
.
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
Note that Abramowitz & Stegun define this function in terms of the
parameters
and
, with the
change of sign
.
These functions compute the incomplete elliptic integral
which is defined through the Carlson form
by the following relation,
The argument n is not used and will be removed in a future release.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
These routines compute the incomplete elliptic integral
to the accuracy specified by the mode variable mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Jacobian Elliptic functions are defined in Abramowitz & Stegun, Chapter 16. The functions are declared in the header file ‘gsl_sf_elljac.h’.
This function computes the Jacobian elliptic functions
,
,
by descending Landen
transformations.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The error function is described in Abramowitz & Stegun, Chapter 7. The functions in this section are declared in the header file ‘gsl_sf_erf.h’.
| 7.15.1 Error Function | ||
| 7.15.2 Complementary Error Function | ||
| 7.15.3 Log Complementary Error Function | ||
| 7.15.4 Probability functions |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the error function
, where
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the complementary error function
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the logarithm of the complementary error function
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The probability functions for the Normal or Gaussian distribution are described in Abramowitz & Stegun, Section 26.2.
These routines compute the Gaussian probability density function
.
These routines compute the upper tail of the Gaussian probability
function
.
The hazard function for the normal distribution,
also known as the inverse Mill's ratio, is defined as,
It decreases rapidly as
approaches
and asymptotes
to
as
approaches
.
These routines compute the hazard function for the normal distribution.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described in this section are declared in the header file ‘gsl_sf_exp.h’.
| 7.16.1 Exponential Function | ||
| 7.16.2 Relative Exponential Functions | ||
| 7.16.3 Exponentiation With Error Estimate |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines provide an exponential function
using GSL
semantics and error checking.
This function computes the exponential
using the
gsl_sf_result_e10 type to return a result with extended range.
This function may be useful if the value of
would
overflow the numeric range of double.
These routines exponentiate x and multiply by the factor y
to return the product
.
This function computes the product
using the
gsl_sf_result_e10 type to return a result with extended numeric
range.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the quantity
using an algorithm
that is accurate for small
.
These routines compute the quantity
using an
algorithm that is accurate for small
. For small
the
algorithm is based on the expansion
.
These routines compute the quantity
using an
algorithm that is accurate for small
. For small
the
algorithm is based on the expansion
.
These routines compute the
-relative exponential, which is the
n-th generalization of the functions gsl_sf_exprel and
gsl_sf_exprel2. The
-relative exponential is given by,
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This function exponentiates x with an associated absolute error dx.
This function exponentiates a quantity x with an associated absolute
error dx using the gsl_sf_result_e10 type to return a result with
extended range.
This routine computes the product
for the quantities
x, y with associated absolute errors dx, dy.
This routine computes the product
for the quantities
x, y with associated absolute errors dx, dy using the
gsl_sf_result_e10 type to return a result with extended range.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Information on the exponential integrals can be found in Abramowitz & Stegun, Chapter 5. These functions are declared in the header file ‘gsl_sf_expint.h’.
| 7.17.1 Exponential Integral | ||
| 7.17.2 Ei(x) | ||
| 7.17.3 Hyperbolic Integrals | ||
| 7.17.4 Ei_3(x) | ||
| 7.17.5 Trigonometric Integrals | ||
| 7.17.6 Arctangent Integral |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the exponential integral
,
These routines compute the second-order exponential integral
,
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the exponential integral
,
where
denotes the principal value of the integral.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the integral
.
These routines compute the integral
, where
is the Euler constant (available as the macro M_EULER).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the third-order exponential integral
for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Sine integral
.
These routines compute the Cosine integral
for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Arctangent integral, which is defined as
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described in this section are declared in the header file ‘gsl_sf_fermi_dirac.h’.
| 7.18.1 Complete Fermi-Dirac Integrals | ||
| 7.18.2 Incomplete Fermi-Dirac Integrals |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The complete Fermi-Dirac integral
is given by,
These routines compute the complete Fermi-Dirac integral with an index of
.
This integral is given by
.
These routines compute the complete Fermi-Dirac integral with an index of
.
This integral is given by
.
These routines compute the complete Fermi-Dirac integral with an index of
,
.
These routines compute the complete Fermi-Dirac integral with an index
of
,
.
These routines compute the complete Fermi-Dirac integral with an integer
index of
,
.
These routines compute the complete Fermi-Dirac integral
.
These routines compute the complete Fermi-Dirac integral
.
These routines compute the complete Fermi-Dirac integral
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The incomplete Fermi-Dirac integral
is given by,
These routines compute the incomplete Fermi-Dirac integral with an index
of zero,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described in this section are declared in the header file ‘gsl_sf_gamma.h’.
| 7.19.1 Gamma Functions | ||
| 7.19.2 Factorials | ||
| 7.19.3 Pochhammer Symbol | ||
| 7.19.4 Incomplete Gamma Functions | ||
| 7.19.5 Beta Functions | ||
| 7.19.6 Incomplete Beta Function |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Gamma function is defined by the following integral,
It is related to the factorial function by
for positive integer
. Further information on the Gamma function
can be found in Abramowitz & Stegun, Chapter 6. The functions
described in this section are declared in the header file
‘gsl_sf_gamma.h’.
These routines compute the Gamma function
, subject to
not being a negative integer or zero. The function is computed using the real
Lanczos method. The maximum value of
such that
is not
considered an overflow is given by the macro GSL_SF_GAMMA_XMAX
and is 171.0.
These routines compute the logarithm of the Gamma function,
, subject to
not being a negative
integer or zero. For
the real part of
is
returned, which is equivalent to
. The function
is computed using the real Lanczos method.
This routine computes the sign of the gamma function and the logarithm of
its magnitude, subject to
not being a negative integer or zero. The
function is computed using the real Lanczos method. The value of the
gamma function can be reconstructed using the relation
.
These routines compute the regulated Gamma Function
for
. The regulated gamma function is given by,
and is a useful suggestion of Temme.
These routines compute the reciprocal of the gamma function,
using the real Lanczos method.
This routine computes
for complex
and
not a negative integer or zero, using the complex Lanczos
method. The returned parameters are
and
in
. Note that the phase
part (arg) is not well-determined when
is very large,
due to inevitable roundoff in restricting to
. This
will result in a GSL_ELOSS error when it occurs. The absolute
value part (lnr), however, never suffers from loss of precision.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Although factorials can be computed from the Gamma function, using
the relation
for non-negative integer
,
it is usually more efficient to call the functions in this section,
particularly for small values of
, whose factorial values are
maintained in hardcoded tables.
These routines compute the factorial
. The factorial is
related to the Gamma function by
.
The maximum value of
such that
is not
considered an overflow is given by the macro GSL_SF_FACT_NMAX
and is 170.
These routines compute the double factorial
.
The maximum value of
such that
is not
considered an overflow is given by the macro GSL_SF_DOUBLEFACT_NMAX
and is 297.
These routines compute the logarithm of the factorial of n,
. The algorithm is faster than computing
via gsl_sf_lngamma for
,
but defers for larger n.
These routines compute the logarithm of the double factorial of n,
.
These routines compute the combinatorial factor n choose m
These routines compute the logarithm of n choose m. This is
equivalent to the sum
.
These routines compute the Taylor coefficient
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Pochhammer symbol
, subject to
and
not being negative
integers or zero. The Pochhammer symbol is also known as the Apell symbol and
sometimes written as
.
These routines compute the logarithm of the Pochhammer symbol,
for
,
.
These routines compute the sign of the Pochhammer symbol and the
logarithm of its magnitude. The computed parameters are
and
where
, subject to
,
not being
negative integers or zero.
These routines compute the relative Pochhammer symbol
where
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These functions compute the unnormalized incomplete Gamma Function
for
real and
.
These routines compute the normalized incomplete Gamma Function
for
,
.
These routines compute the complementary normalized incomplete Gamma Function
for
,
.
Note that Abramowitz & Stegun call
the incomplete gamma
function (section 6.5).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Beta Function,
subject to
and
not
being negative integers.
These routines compute the logarithm of the Beta Function,
subject to
and
not
being negative integers.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the normalized incomplete Beta function
where
for
,
, and
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Gegenbauer polynomials are defined in Abramowitz & Stegun, Chapter 22, where they are known as Ultraspherical polynomials. The functions described in this section are declared in the header file ‘gsl_sf_gegenbauer.h’.
These functions evaluate the Gegenbauer polynomials
using explicit
representations for
.
These functions evaluate the Gegenbauer polynomial
for a specific value of n,
lambda, x subject to
,
.
This function computes an array of Gegenbauer polynomials
for
, subject
to
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Hypergeometric functions are described in Abramowitz & Stegun, Chapters 13 and 15. These functions are declared in the header file ‘gsl_sf_hyperg.h’.
These routines compute the hypergeometric function
.
These routines compute the confluent hypergeometric function
for integer parameters m, n.
These routines compute the confluent hypergeometric function
for general parameters a, b.
These routines compute the confluent hypergeometric function
for integer parameters m, n.
This routine computes the confluent hypergeometric function
for integer parameters m, n using the
gsl_sf_result_e10 type to return a result with extended range.
These routines compute the confluent hypergeometric function
.
This routine computes the confluent hypergeometric function
using the gsl_sf_result_e10 type to return a
result with extended range.
These routines compute the Gauss hypergeometric function
for
.
If the arguments
are too close to a singularity then
the function can return the error code GSL_EMAXITER when the
series approximation converges too slowly. This occurs in the region of
,
for integer m.
These routines compute the Gauss hypergeometric function
with complex parameters
for
.
exceptions:
These routines compute the renormalized Gauss hypergeometric function
for
.
These routines compute the renormalized Gauss hypergeometric function
for
.
These routines compute the hypergeometric function
. The series representation
is a divergent hypergeometric series. However, for
we
have
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The generalized Laguerre polynomials are defined in terms of confluent
hypergeometric functions as
, and are sometimes referred to as the
associated Laguerre polynomials. They are related to the plain
Laguerre polynomials
by
and
. For
more information see Abramowitz & Stegun, Chapter 22.
The functions described in this section are declared in the header file ‘gsl_sf_laguerre.h’.
These routines evaluate the generalized Laguerre polynomials
,
,
using explicit
representations.
These routines evaluate the generalized Laguerre polynomials
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Lambert's W functions,
, are defined to be solutions
of the equation
. This function has
multiple branches for
; however, it has only
two real-valued branches. We define
to be the
principal branch, where
for
, and
to be the other real branch, where
for
. The Lambert functions are
declared in the header file ‘gsl_sf_lambert.h’.
These compute the principal branch of the Lambert W function,
.
These compute the secondary real-valued branch of the Lambert W function,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Legendre Functions and Legendre Polynomials are described in Abramowitz & Stegun, Chapter 8. These functions are declared in the header file ‘gsl_sf_legendre.h’.
| 7.24.1 Legendre Polynomials | ||
| 7.24.2 Associated Legendre Polynomials and Spherical Harmonics | ||
| 7.24.3 Conical Functions | ||
| 7.24.4 Radial Functions for Hyperbolic Space |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These functions evaluate the Legendre polynomials
using explicit
representations for
.
These functions evaluate the Legendre polynomial
for a specific value of l,
x subject to
,
These functions compute an array of Legendre polynomials
, and optionally their derivatives
,
for
,
These routines compute the Legendre function
for
,
.
These routines compute the Legendre function
for
,
.
These routines compute the Legendre function
for
,
and
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following functions compute the associated Legendre Polynomials
. Note that this function grows combinatorially with
and can overflow for
larger than about 150. There is
no trouble for small
, but overflow occurs when
and
are both large. Rather than allow overflows, these functions
refuse to calculate
and return GSL_EOVRFLW when
they can sense that
and
are too big.
If you want to calculate a spherical harmonic, then do not use
these functions. Instead use gsl_sf_legendre_sphPlm below,
which uses a similar recursion, but with the normalized functions.
These routines compute the associated Legendre polynomial
for
,
,
.
These functions compute an array of Legendre polynomials
, and optionally their derivatives
,
for
,
,
.
These routines compute the normalized associated Legendre polynomial
These functions compute an array of normalized associated Legendre functions
This function returns the size of result_array[] needed for the array
versions of
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Conical Functions
and
are described in Abramowitz & Stegun, Section 8.12.
These routines compute the irregular Spherical Conical Function
for
.
These routines compute the regular Spherical Conical Function
for
.
These routines compute the conical function
for
.
These routines compute the conical function
for
.
These routines compute the Regular Spherical Conical Function
for
,
.
These routines compute the Regular Cylindrical Conical Function
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following spherical functions are specializations of Legendre
functions which give the regular eigenfunctions of the Laplacian on a
3-dimensional hyperbolic space
. Of particular interest is
the flat limit,
,
,
fixed.
These routines compute the zeroth radial eigenfunction of the Laplacian on the
3-dimensional hyperbolic space,
for
.
In the flat limit this takes the form
.
These routines compute the first radial eigenfunction of the Laplacian on
the 3-dimensional hyperbolic space,
for
.
In the flat limit this takes the form
.
These routines compute the l-th radial eigenfunction of the
Laplacian on the 3-dimensional hyperbolic space
,
. In the flat limit this takes the form
.
This function computes an array of radial eigenfunctions
for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Information on the properties of the Logarithm function can be found in Abramowitz & Stegun, Chapter 4. The functions described in this section are declared in the header file ‘gsl_sf_log.h’.
These routines compute the logarithm of x,
, for
.
These routines compute the logarithm of the magnitude of x,
, for
.
This routine computes the complex logarithm of
. The results are returned as lnr, theta such that
, where
lies in
the range
.
These routines compute
for
using an
algorithm that is accurate for small
.
These routines compute
for
using an
algorithm that is accurate for small
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The routines described in this section compute the angular and radial
Mathieu functions, and their characteristic values. Mathieu
functions are the solutions of the following two differential
equations:
The angular Mathieu functions
,
are
the even and odd periodic solutions of the first equation, which is known as Mathieu's equation. These exist
only for the discrete sequence of characteristic values
(even-periodic) and
(odd-periodic).
The radial Mathieu functions
,
are the solutions of the second equation,
which is referred to as Mathieu's modified equation. The
radial Mathieu functions of the first, second, third and fourth kind
are denoted by the parameter
, which takes the value 1, 2, 3
or 4.
For more information on the Mathieu functions, see Abramowitz and Stegun, Chapter 20. These functions are defined in the header file ‘gsl_sf_mathieu.h’.
| 7.26.1 Mathieu Function Workspace | ||
| 7.26.2 Mathieu Function Characteristic Values | ||
| 7.26.3 Angular Mathieu Functions | ||
| 7.26.4 Radial Mathieu Functions |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Mathieu functions can be computed for a single order or for multiple orders, using array-based routines. The array-based routines require a preallocated workspace.
This function returns a workspace for the array versions of the
Mathieu routines. The arguments n and qmax specify the
maximum order and
-value of Mathieu functions which can be
computed with this workspace.
This function frees the workspace work.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the characteristic values
,
of the Mathieu functions
and
, respectively.
These routines compute a series of Mathieu characteristic values
,
for
from order_min to
order_max inclusive, storing the results in the array result_array.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the angular Mathieu functions
and
, respectively.
These routines compute a series of the angular Mathieu functions
and
of order
from
nmin to nmax inclusive, storing the results in the array
result_array.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the radial j-th kind Mathieu functions
and
of order n.
The allowed values of j are 1 and 2.
The functions for
can be computed as
and
,
where
or
.
These routines compute a series of the radial Mathieu functions of kind j, with order from nmin to nmax inclusive, storing the results in the array result_array.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following functions are equivalent to the function gsl_pow_int
(see section Small integer powers) with an error estimate. These functions are
declared in the header file ‘gsl_sf_pow_int.h’.
These routines compute the power
for integer n. The
power is computed using the minimum number of multiplications. For
example,
is computed as
, requiring only 3
multiplications. For reasons of efficiency, these functions do not
check for overflow or underflow conditions.
#include <gsl/gsl_sf_pow_int.h> /* compute 3.0**12 */ double y = gsl_sf_pow_int(3.0, 12); |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The polygamma functions of order
are defined by
where
is known as the digamma function.
These functions are declared in the header file ‘gsl_sf_psi.h’.
| 7.28.1 Digamma Function | ||
| 7.28.2 Trigamma Function | ||
| 7.28.3 Polygamma Function |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the digamma function
for positive
integer n. The digamma function is also called the Psi function.
These routines compute the digamma function
for general
,
.
These routines compute the real part of the digamma function on the line
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the Trigamma function
for
positive integer
.
These routines compute the Trigamma function
for
general
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the polygamma function
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described in this section are declared in the header file ‘gsl_sf_synchrotron.h’.
These routines compute the first synchrotron function
for
.
These routines compute the second synchrotron function
for
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The transport functions
are defined by the integral
representations
.
They are declared in the header file ‘gsl_sf_transport.h’.
These routines compute the transport function
.
These routines compute the transport function
.
These routines compute the transport function
.
These routines compute the transport function
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The library includes its own trigonometric functions in order to provide consistency across platforms and reliable error estimates. These functions are declared in the header file ‘gsl_sf_trig.h’.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute the sine function
.
These routines compute the cosine function
.
These routines compute the hypotenuse function
avoiding overflow and underflow.
These routines compute
for any
value of x.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This function computes the complex sine,
storing
the real and imaginary parts in szr, szi.
This function computes the complex cosine,
storing
the real and imaginary parts in szr, szi.
This function computes the logarithm of the complex sine,
storing the real and imaginary parts in
szr, szi.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines compute
for
.
These routines compute
for any x.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This function converts the polar coordinates (r,theta) to
rectilinear coordinates (x,y),
,
.
This function converts the rectilinear coordinates (x,y) to
polar coordinates (r,theta), such that
,
. The argument theta
lies in the range
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These routines force the angle theta to lie in the range
.
Note that the mathematical value of
is slightly greater
than M_PI, so the machine numbers M_PI and -M_PI
are included in the range.
These routines force the angle theta to lie in the range
.
Note that the mathematical value of
is slightly greater
than 2*M_PI, so the machine number 2*M_PI is included in
the range.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This routine computes the sine of an angle x with an associated
absolute error dx,
. Note that this function is provided in the error-handling form only since
its purpose is to compute the propagated error.
This routine computes the cosine of an angle x with an associated
absolute error dx,
. Note that this function is provided in the error-handling form only since
its purpose is to compute the propagated error.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Riemann zeta function is defined in Abramowitz & Stegun, Section 23.2. The functions described in this section are declared in the header file ‘gsl_sf_zeta.h’.
| 7.32.1 Riemann Zeta Function | ||
| 7.32.2 Riemann Zeta Function Minus One | ||
| 7.32.3 Hurwitz Zeta Function | ||
| 7.32.4 Eta Function |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Riemann zeta function is defined by the infinite sum
.
These routines compute the Riemann zeta function
for integer n,
.
These routines compute the Riemann zeta function
for arbitrary s,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For large positive argument, the Riemann zeta function approaches one. In this region the fractional part is interesting, and therefore we need a function to evaluate it explicitly.
These routines compute
for integer n,
.
These routines compute
for arbitrary s,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Hurwitz zeta function is defined by
.
These routines compute the Hurwitz zeta function
for
,
.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The eta function is defined by
.
These routines compute the eta function
for integer n.
These routines compute the eta function
for arbitrary s.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following example demonstrates the use of the error handling form of
the special functions, in this case to compute the Bessel function
,
|
Here are the results of running the program,
$ ./a.out
|
The next program computes the same quantity using the natural form of the function. In this case the error term result.err and return status are not accessible.
|
The results of the function are the same,
$ ./a.outJ0(5.0) = -0.177596771314338292 exact = -0.177596771314338292 |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The library follows the conventions of Abramowitz & Stegun where possible,
The following papers contain information on the algorithms used to compute the special functions,
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Autobuild on September, 26 2007 using texi2html 1.78.