]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/doc/sf/hermite.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / math / doc / sf / hermite.qbk
1 [section:hermite Hermite Polynomials]
2
3 [h4 Synopsis]
4
5 ``
6 #include <boost/math/special_functions/hermite.hpp>
7 ``
8
9 namespace boost{ namespace math{
10
11 template <class T>
12 ``__sf_result`` hermite(unsigned n, T x);
13
14 template <class T, class ``__Policy``>
15 ``__sf_result`` hermite(unsigned n, T x, const ``__Policy``&);
16
17 template <class T1, class T2, class T3>
18 ``__sf_result`` hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
19
20 }} // namespaces
21
22 [h4 Description]
23
24 The return type of these functions is computed using the __arg_promotion_rules:
25 note than when there is a single template argument the result is the same type
26 as that argument or `double` if the template argument is an integer type.
27
28 template <class T>
29 ``__sf_result`` hermite(unsigned n, T x);
30
31 template <class T, class ``__Policy``>
32 ``__sf_result`` hermite(unsigned n, T x, const ``__Policy``&);
33
34 Returns the value of the Hermite Polynomial of order /n/ at point /x/:
35
36 [equation hermite_0]
37
38 [optional_policy]
39
40 The following graph illustrates the behaviour of the first few
41 Hermite Polynomials:
42
43 [graph hermite]
44
45 template <class T1, class T2, class T3>
46 ``__sf_result`` hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
47
48 Implements the three term recurrence relation for the Hermite
49 polynomials, this function can be used to create a sequence of
50 values evaluated at the same /x/, and for rising /n/.
51
52 [equation hermite_1]
53
54 For example we could produce a vector of the first 10 polynomial
55 values using:
56
57 double x = 0.5; // Abscissa value
58 vector<double> v;
59 v.push_back(hermite(0, x)).push_back(hermite(1, x));
60 for(unsigned l = 1; l < 10; ++l)
61 v.push_back(hermite_next(l, x, v[l], v[l-1]));
62
63 Formally the arguments are:
64
65 [variablelist
66 [[n][The degree /n/ of the last polynomial calculated.]]
67 [[x][The abscissa value]]
68 [[Hn][The value of the polynomial evaluated at degree /n/.]]
69 [[Hnm1][The value of the polynomial evaluated at degree /n-1/.]]
70 ]
71
72 [h4 Accuracy]
73
74 The following table shows peak errors (in units of epsilon)
75 for various domains of input arguments.
76 Note that only results for the widest floating point type on the system are
77 given as narrower types have __zero_error.
78
79 [table_hermite]
80
81 Note that the worst errors occur when the degree increases, values greater than
82 ~120 are very unlikely to produce sensible results, especially in the associated
83 polynomial case when the order is also large. Further the relative errors
84 are likely to grow arbitrarily large when the function is very close to a root.
85
86 [h4 Testing]
87
88 A mixture of spot tests of values calculated using functions.wolfram.com,
89 and randomly generated test data are
90 used: the test data was computed using
91 [@http://shoup.net/ntl/doc/RR.txt NTL::RR] at 1000-bit precision.
92
93 [h4 Implementation]
94
95 These functions are implemented using the stable three term
96 recurrence relations. These relations guarantee low absolute error
97 but cannot guarantee low relative error near one of the roots of the
98 polynomials.
99
100 [endsect][/section:beta_function The Beta Function]
101 [/
102 Copyright 2006 John Maddock and Paul A. Bristow.
103 Distributed under the Boost Software License, Version 1.0.
104 (See accompanying file LICENSE_1_0.txt or copy at
105 http://www.boost.org/LICENSE_1_0.txt).
106 ]
107