]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/doc/sf/inv_hyper.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / math / doc / sf / inv_hyper.qbk
CommitLineData
7c673cae
FG
1[/ math.qbk
2 Copyright 2006 Hubert Holin and John Maddock.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[def __form1 [^\[0;+'''∞'''\[]]
9[def __form2 [^\]-'''∞''';+1\[]]
10[def __form3 [^\]-'''∞''';-1\[]]
11[def __form4 [^\]+1;+'''∞'''\[]]
12[def __form5 [^\[-1;-1+'''ε'''\[]]
13[def __form6 '''ε''']
14[def __form7 [^\]+1-'''ε''';+1\]]]
15
16[def __effects [*Effects: ]]
17[def __formula [*Formula: ]]
18[def __exm1 '''<code>e<superscript>x</superscript> - 1</code>'''[space]]
19[def __ex '''<code>e<superscript>x</superscript></code>''']
20[def __te '''2&#x03B5;''']
21
22[section:inv_hyper Inverse Hyperbolic Functions]
23
24[section:inv_hyper_over Inverse Hyperbolic Functions Overview]
25
26The exponential funtion is defined, for all objects for which this makes sense,
27as the power series
28[equation special_functions_blurb1],
29with ['[^n! = 1x2x3x4x5...xn]] (and ['[^0! = 1]] by definition) being the factorial of ['[^n]].
30In particular, the exponential function is well defined for real numbers,
31complex number, quaternions, octonions, and matrices of complex numbers,
32among others.
33
34[: ['[*Graph of exp on R]] ]
35
36[: [$../graphs/exp_on_r.png] ]
37
38[: ['[*Real and Imaginary parts of exp on C]]]
39[: [$../graphs/im_exp_on_c.png]]
40
41The hyperbolic functions are defined as power series which
42can be computed (for reals, complex, quaternions and octonions) as:
43
44Hyperbolic cosine: [equation special_functions_blurb5]
45
46Hyperbolic sine: [equation special_functions_blurb6]
47
48Hyperbolic tangent: [equation special_functions_blurb7]
49
50[: ['[*Trigonometric functions on R (cos: purple; sin: red; tan: blue)]]]
51[: [$../graphs/trigonometric.png]]
52
53[: ['[*Hyperbolic functions on r (cosh: purple; sinh: red; tanh: blue)]]]
54[: [$../graphs/hyperbolic.png]]
55
56The hyperbolic sine is one to one on the set of real numbers,
57with range the full set of reals, while the hyperbolic tangent is
58also one to one on the set of real numbers but with range __form1, and
59therefore both have inverses. The hyperbolic cosine is one to one from __form2
60onto __form3 (and from __form4 onto __form3); the inverse function we use
61here is defined on __form3 with range __form2.
62
63The inverse of the hyperbolic tangent is called the Argument hyperbolic tangent,
64and can be computed as [equation special_functions_blurb15].
65
66The inverse of the hyperbolic sine is called the Argument hyperbolic sine,
67and can be computed (for __form5) as [equation special_functions_blurb17].
68
69The inverse of the hyperbolic cosine is called the Argument hyperbolic cosine,
70and can be computed as [equation special_functions_blurb18].
71
72[endsect]
73
74[section:acosh acosh]
75
76``
77#include <boost/math/special_functions/acosh.hpp>
78``
79
80 template<class T>
81 ``__sf_result`` acosh(const T x);
82
83 template<class T, class ``__Policy``>
84 ``__sf_result`` acosh(const T x, const ``__Policy``&);
85
86Computes the reciprocal of (the restriction to the range of __form1)
87[link math_toolkit.inv_hyper.inv_hyper_over
88the hyperbolic cosine function], at x. Values returned are positive.
89
90If x is in the range __form2 then returns the result of __domain_error.
91
92The return type of this function is computed using the __arg_promotion_rules:
93the return type is `double` when T is an integer type, and T otherwise.
94
95[optional_policy]
96
97[graph acosh]
98
99[h4 Accuracy]
100
101Generally accuracy is to within 1 or 2 epsilon across all supported platforms.
102
103[h4 Testing]
104
105This function is tested using a combination of random test values designed to give
106full function coverage computed at high precision using the "naive" formula:
107
108[equation acosh1]
109
110along with a selection of sanity check values
111computed using functions.wolfram.com to at least 50 decimal digits.
112
113[h4 Implementation]
114
115For sufficiently large x, we can use the
116[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/06/01/0001/
117approximation]:
118
119[equation acosh2]
120
121For x sufficiently close to 1 we can use the
122[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/04/01/0001/
123approximation]:
124
125[equation acosh4]
126
127Otherwise for x close to 1 we can use the following rearrangement of the
128primary definition to preserve accuracy:
129
130[equation acosh3]
131
132Otherwise the
133[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/02/
134primary definition] is used:
135
136[equation acosh1]
137
138[endsect]
139
140[section:asinh asinh]
141
142``
143#include <boost/math/special_functions/asinh.hpp>
144``
145
146 template<class T>
147 ``__sf_result`` asinh(const T x);
148
149 template<class T, class ``__Policy``>
150 ``__sf_result`` asinh(const T x, const ``__Policy``&);
151
152Computes the reciprocal of
153[link math_toolkit.inv_hyper.inv_hyper_over
154the hyperbolic sine function].
155
156The return type of this function is computed using the __arg_promotion_rules:
157the return type is `double` when T is an integer type, and T otherwise.
158
159[graph asinh]
160
161[optional_policy]
162
163[h4 Accuracy]
164
165Generally accuracy is to within 1 or 2 epsilon across all supported platforms.
166
167[h4 Testing]
168
169This function is tested using a combination of random test values designed to give
170full function coverage computed at high precision using the "naive" formula:
171
172[equation asinh1]
173
174along with a selection of sanity check values
175computed using functions.wolfram.com to at least 50 decimal digits.
176
177[h4 Implementation]
178
179For sufficiently large x we can use the
180[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/06/01/0001/
181approximation]:
182
183[equation asinh2]
184
185While for very small x we can use the
186[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/03/01/0001/
187approximation]:
188
189[equation asinh3]
190
191For 0.5 > x > [epsilon] the following rearrangement of the primary definition is used:
192
193[equation asinh4]
194
195Otherwise evalution is via the
196[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/
197primary definition]:
198
199[equation asinh4]
200
201[endsect]
202
203[section:atanh atanh]
204
205``
206#include <boost/math/special_functions/atanh.hpp>
207``
208
209 template<class T>
210 ``__sf_result`` atanh(const T x);
211
212 template<class T, class ``__Policy``>
213 ``__sf_result`` atanh(const T x, const ``__Policy``&);
214
215Computes the reciprocal of
216[link math_toolkit.inv_hyper.inv_hyper_over
217the hyperbolic tangent function], at x.
218
219[optional_policy]
220
221If x is in the range
222__form3
223or in the range
224__form4
225then returns the result of __domain_error.
226
227If x is in the range
228__form5,
229then the result of -__overflow_error is returned, with
230__form6[space]
231denoting numeric_limits<T>::epsilon().
232
233If x is in the range
234__form7,
235then the result of __overflow_error is returned, with
236__form6[space]
237denoting
238numeric_limits<T>::epsilon().
239
240The return type of this function is computed using the __arg_promotion_rules:
241the return type is `double` when T is an integer type, and T otherwise.
242
243[graph atanh]
244
245[h4 Accuracy]
246
247Generally accuracy is to within 1 or 2 epsilon across all supported platforms.
248
249[h4 Testing]
250
251This function is tested using a combination of random test values designed to give
252full function coverage computed at high precision using the "naive" formula:
253
254[equation atanh1]
255
256along with a selection of sanity check values
257computed using functions.wolfram.com to at least 50 decimal digits.
258
259[h4 Implementation]
260
261For sufficiently small x we can use the
262[@http://functions.wolfram.com/ElementaryFunctions/ArcTanh/06/01/03/01/ approximation]:
263
264[equation atanh2]
265
266Otherwise the
267[@http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/ primary definition]:
268
269[equation atanh1]
270
271or its equivalent form:
272
273[equation atanh3]
274
275is used.
276
277[endsect]
278
279[endsect]