1 [def __effects [*Effects: ]]
2 [def __formula [*Formula: ]]
3 [def __exm1 '''<code>e<superscript>x</superscript> - 1</code>''']
4 [def __ex '''<code>e<superscript>x</superscript></code>''']
5 [def __te '''2ε''']
7 [mathpart inverse_complex..Complex Number Functions]
9 The following complex number algorithms are the inverses of trigonometric functions currently
10 present in the C++ standard. Equivalents to these functions are part of the C99 standard, and
11 are part of the [tr1].
13 [section:complex_implementation Implementation and Accuracy]
15 Although there are deceptively simple formulae available for all of these functions, a naive
16 implementation that used these formulae would fail catastrophically for some input
17 values. The Boost versions of these functions have been implemented using the methodology
18 described in "Implementing the Complex Arcsine and Arccosine Functions Using Exception Handling"
19 by T. E. Hull Thomas F. Fairgrieve and Ping Tak Peter Tang, ACM Transactions on Mathematical Software,
20 Vol. 23, No. 3, September 1997. This means that the functions are well defined over the entire
21 complex number range, and produce accurate values even at the extremes of that range, where as a naive
22 formula would cause overflow or underflow to occur during the calculation, even though the result is
23 actually a representable value. The maximum theoretical relative error for all of these functions
24 is less than 9.5[epsilon] for every machine-representable point in the complex plane. Please refer to
25 comments in the header files themselves and to the above mentioned paper for more information
26 on the implementation methodology.
34 #include <boost/math/complex/asin.hpp>
39 std::complex<T> asin(const std::complex<T>& z);
41 __effects returns the inverse sine of the complex number z.
43 __formula [$../images/asin.png]
51 #include <boost/math/complex/acos.hpp>
56 std::complex<T> acos(const std::complex<T>& z);
58 __effects returns the inverse cosine of the complex number z.
60 __formula [$../images/acos.png]
68 #include <boost/math/complex/atan.hpp>
73 std::complex<T> atan(const std::complex<T>& z);
75 __effects returns the inverse tangent of the complex number z.
77 __formula [$../images/atan.png]
85 #include <boost/math/complex/asinh.hpp>
90 std::complex<T> asinh(const std::complex<T>& z);
92 __effects returns the inverse hyperbolic sine of the complex number z.
94 __formula [$../images/asinh.png]
102 #include <boost/math/complex/acosh.hpp>
107 std::complex<T> acosh(const std::complex<T>& z);
109 __effects returns the inverse hyperbolic cosine of the complex number z.
111 __formula [$../images/acosh.png]
115 [section:atanh atanh]
119 #include <boost/math/complex/atanh.hpp>
124 std::complex<T> atanh(const std::complex<T>& z);
126 __effects returns the inverse hyperbolic tangent of the complex number z.
128 __formula [$../images/atanh.png]
132 [section:complex_history History]
134 * 2005/12/17: Added support for platforms with no meaningful numeric_limits<>::infinity().
135 * 2005/12/01: Initial version, added as part of the TR1 library.
143 Copyright 2008, 2009 John Maddock and Paul A. Bristow.
144 Distributed under the Boost Software License, Version 1.0.
145 (See accompanying file LICENSE_1_0.txt or copy at
146 http://www.boost.org/LICENSE_1_0.txt).