0% found this document useful (0 votes)
34 views

Sint cl05

dfg

Uploaded by

Khhg Agdds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Sint cl05

dfg

Uploaded by

Khhg Agdds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

s – Approximations of Special Functions Introduction – s

Chapter s – Approximations of Special Functions

1. Scope of the Chapter


This chapter provides functions for computing some of the most commonly required special functions
of mathematics. See Chapter g01 for probability distribution functions and their inverses.

2. Accuracy
The majority of the functions in this chapter evaluate real-valued functions of a single real variable
x. The accuracy of the computed value is discussed in each function document, along the following
lines.
Let ∆ be the absolute error in the argument x, and δ be the relative error in x.
If we ignore errors that arise in the argument by propagation of data errors etc. and consider only
those errors that result from the fact that a real number is being represented in the computer in
floating-point form with finite precision, then δ is bounded and this bound is independent of the
magnitude of x; for example, on an n-digit machine

|δ| ≤ 10−n .

(This of course implies that the absolute error ∆ = xδ is also bounded but the bound is now
dependent on x.)
Let E be the absolute error in the computed function value f (x), and  be the relative error. Then

E  |f  (x)|∆
E  |xf  (x)|δ
  |xf  (x)/f (x)|δ.

If possible, the function documents discuss the last of these relations, that is the propagation of
relative error, in terms of the error amplification factor |xf  (x)/f (x)|. But in some cases, such as
near zeros of the function which cannot be extracted explicitly, absolute error in the result is the
quantity of significance and here the factor |xf  (x)| is described.
In general, testing of the functions has shown that the behaviour of the actual errors follows fairly
well these theoretical relations. In regions where the error amplification factors are less than one,
or of the order of one, the errors are slightly larger than the above predictions. The errors are here
limited largely by the finite precision of arithmetic in the machine, but  is normally no more than
a few times greater than the bound on δ. In regions where the amplification factors are large, of
order of ten or greater, the theoretical analysis gives a good measure of the accuracy obtainable.

3. Approximations to Elliptic Integrals


3.1. Definitions of Symmetrised Elliptic Integrals
Four functions in the chapter compute symmetrised variants of the classical elliptic integrals. These
alternative definitions have been suggested by Carlson and he also developed the basic algorithms
used in this chapter.
Important Advice: users who encounter elliptic integrals in the course of their work are strongly
recommended to look at transforming their analysis directly to one of the Carlson forms, rather
than the traditional canonical Legendre forms. In general, the extra symmetry of the Carlson forms
is likely to simplify the analysis, and these symmetric forms are much more stable to calculate. In
case that is not possible, rules for computing the Legendre forms in terms of the Carlson forms are
given below.
The symmetrised integral of the first kind, which is computed by nag elliptic integral rf (s21bbc),
is defined by
 ∞
dt
1
RF (x, y, z) = 2 
0 (t + x)(t + y)(t + z)

[NP3275/5/pdf] 3.intro-s.1
Introduction – s NAG C Library Manual

where x, y, z ≥ 0 and at most one may be equal to zero. The normalisation factor, 12 , is chosen so
as to make

RF (x, x, x) = 1/ x.

If any two of the variables are equal, RF degenerates into the function RC , which is computed by
nag elliptic integral rc (s21bac):
 ∞
dt
RC (x, y) = RF (x, y, y) = 12 √
0 t + x(t + y)

where the argument restrictions are now x ≥ 0 and y = 0.


The symmetrised integral of the second kind, which is computed by nag elliptic integral rd (s21bcc),
is defined by
 ∞
dt
3
RD (x, y, z) = 2 
0 (t + x)(t + y)(t + z)3

with z > 0, x ≥ 0 and y ≥ 0 but only one of x or y may be zero.


This function is a degenerate special case of the integral of the third kind, which is computed by
nag elliptic integral rj (s21bdc) and is defined by
 ∞
dt
3
RJ (x, y, z, ρ) = 2 
0 (t + x)(t + y)(t + z)(t + ρ)

with ρ = 0, x, y, z ≥ 0 with at most one equality holding. Thus RD (x, y, z) = RJ (x, y, z, z). The
normalisation of both these functions is chosen so that

RD (x, x, x) = RJ (x, x, x, x) = 1/(x x).

3.2. Relationships with Classical Elliptic Integrals


The above forms can be related to the more traditional Legendre canonical forms as follows. Let

q = cos2 φ, r = 1 − m sin2 φ, s = 1 + n sin2 φ,

where 0 < φ ≤ 12 π. Then we have


the incomplete elliptic integral of the first kind:
 sin φ
F (φ|m) = (1 − t2 )−1/2 (1 − mt2 )−1/2 dt = sin φRF (q, r, 1);
0

the incomplete elliptic integral of the second kind:


 sin φ
E(φ|m) = (1 − t2 )−1/2 (1 − mt2 )1/2 dt
0

= sin φRF (q, r, 1) − 13 m sin3 φRD (q, r, 1);

the elliptic integral of the third kind:


 sin φ
Π(n; φ|m) = (1 − t2 )−1/2 (1 − mt2 )−1/2 (1 + nt2 )−1 dt
0

= sin φRF (q, r, 1) − 13 n sin3 φRJ (q, r, 1, s).

Also the complete elliptic integral of the first kind:


 π/2
K(m) = (1 − m sin2 θ)−1/2 dθ = RF (0, 1 − m, 1);
0

3.intro-s.2 [NP3275/5/pdf]
s – Approximations of Special Functions Introduction – s

and the complete elliptic integral of the second kind:


 π/2
E(m) = (1 − m sin2 θ)1/2 dθ
0

= RF (0, 1 − m, 1) − 13 mRD (0, 1 − m, 1).

The function RC is related to the logarithm or inverse hyperbolic functions if 0 < y < x, and to
the inverse circular functions if 0 ≤ x ≤ y. For example
 2 
1+x
ln x = (x − 1)RC , x , x > 0;
2

arcsin x = xRC (1 − x2 , 1), |x| ≤ 1;


arcsinh x = xRC (1 + x2 , 1), etc.

In general this method of calculating elementary functions is not recommended as there are usually
much more efficient specific functions available. However RC may be used, for example, to compute
ln x/(x − 1) when x is close to 1, without the loss of significant figures that occurs when ln x and
x − 1 are computed separately.

4. Available Functions
Airy function, Ai(x) s17agc
Airy function, Ai (x) s17ajc
Airy function, Bi(x) s17ahc
Airy function, Bi (x) s17akc
Arccosh(x) s11acc
Arcsinh(x) s11abc
Arctanh(x) s11aac
Bessel function, J0 (x) s17aec
Bessel function, J1 (x) s17afc
Bessel function, Y0 (x) s17acc
Bessel function, Y1 (x) s17adc
Complementary error function, erfc(x) s15adc
Cosh(x) s10acc
Cosine Integral, Ci(x) s13acc
Cumulative Normal distribution s15abc
Cumulative Normal distribution complement s15acc
Elliptic integral, symmetrised, degenerate of 1st kind, RC s21bac
Elliptic integral, symmetrised, of 1st kind, RF s21bbc
Elliptic integral, symmetrised, of 2nd kind, RD s21bcc
Elliptic integral, symmetrised, of 3rd kind, RJ s21bdc
Error function, erf(x) s15aec
Exponential Integral, E1 (x) s13aac
Fresnel Integral, C(x) s20adc
Fresnel Integral, S(x) s20acc
Gamma function, Γ(x) s14aac
Incomplete Gamma function, P (a, x) and Q(a, x) s14bac
Kelvin function, bei x s19abc
Kelvin function, ber x s19aac
Kelvin function, kei x s19adc
Kelvin function, ker x s19acc
Logarithm of Gamma function, ln Γ(x) s14abc
Modified Bessel function, I0 (x) s18aec
Modified Bessel function, I1 (x) s18afc
Modified Bessel function, K0 (x) s18acc
Modified Bessel function, K1 (x) s18adc
Scaled modified Bessel function, e−|x|I0 (x) s18cec

[NP3275/5/pdf] 3.intro-s.3
Introduction – s NAG C Library Manual

Scaled modified Bessel function, e−|x|I1 (x) s18cfc


Scaled modified Bessel function, ex K0 (x) s18ccc
Scaled modified Bessel function, ex K1 (x) s18cdc
Sine integral, Si(x) s13adc
Sinh(x) s10abc
Tanh(x) s10aac
See also Chapter g01 for probability distribution functions and their inverses.

3.intro-s.4 [NP3275/5/pdf]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy