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ε'''] 6 7[mathpart inverse_complex..Complex Number Functions] 8 9The following complex number algorithms are the inverses of trigonometric functions currently 10present in the C++ standard. Equivalents to these functions are part of the C99 standard, and 11are part of the [tr1]. 12 13[section:complex_implementation Implementation and Accuracy] 14 15Although there are deceptively simple formulae available for all of these functions, a naive 16implementation that used these formulae would fail catastrophically for some input 17values. The Boost versions of these functions have been implemented using the methodology 18described in "Implementing the Complex Arcsine and Arccosine Functions Using Exception Handling" 19by T. E. Hull Thomas F. Fairgrieve and Ping Tak Peter Tang, ACM Transactions on Mathematical Software, 20Vol. 23, No. 3, September 1997. This means that the functions are well defined over the entire 21complex number range, and produce accurate values even at the extremes of that range, where as a naive 22formula would cause overflow or underflow to occur during the calculation, even though the result is 23actually a representable value. The maximum theoretical relative error for all of these functions 24is less than 9.5[epsilon] for every machine-representable point in the complex plane. Please refer to 25comments in the header files themselves and to the above mentioned paper for more information 26on the implementation methodology. 27 28[endsect] 29 30[section:asin asin] 31 32[h4 Header:] 33 34 #include <boost/math/complex/asin.hpp> 35 36[h4 Synopsis:] 37 38 template<class T> 39 std::complex<T> asin(const std::complex<T>& z); 40 41__effects returns the inverse sine of the complex number z. 42 43__formula [$../images/asin.png] 44 45[endsect] 46 47[section:acos acos] 48 49[h4 Header:] 50 51 #include <boost/math/complex/acos.hpp> 52 53[h4 Synopsis:] 54 55 template<class T> 56 std::complex<T> acos(const std::complex<T>& z); 57 58__effects returns the inverse cosine of the complex number z. 59 60__formula [$../images/acos.png] 61 62[endsect] 63 64[section:atan atan] 65 66[h4 Header:] 67 68 #include <boost/math/complex/atan.hpp> 69 70[h4 Synopsis:] 71 72 template<class T> 73 std::complex<T> atan(const std::complex<T>& z); 74 75__effects returns the inverse tangent of the complex number z. 76 77__formula [$../images/atan.png] 78 79[endsect] 80 81[section:asinh asinh] 82 83[h4 Header:] 84 85 #include <boost/math/complex/asinh.hpp> 86 87[h4 Synopsis:] 88 89 template<class T> 90 std::complex<T> asinh(const std::complex<T>& z); 91 92__effects returns the inverse hyperbolic sine of the complex number z. 93 94__formula [$../images/asinh.png] 95 96[endsect] 97 98[section:acosh acosh] 99 100[h4 Header:] 101 102 #include <boost/math/complex/acosh.hpp> 103 104[h4 Synopsis:] 105 106 template<class T> 107 std::complex<T> acosh(const std::complex<T>& z); 108 109__effects returns the inverse hyperbolic cosine of the complex number z. 110 111__formula [$../images/acosh.png] 112 113[endsect] 114 115[section:atanh atanh] 116 117[h4 Header:] 118 119 #include <boost/math/complex/atanh.hpp> 120 121[h4 Synopsis:] 122 123 template<class T> 124 std::complex<T> atanh(const std::complex<T>& z); 125 126__effects returns the inverse hyperbolic tangent of the complex number z. 127 128__formula [$../images/atanh.png] 129 130[endsect] 131 132[section:complex_history History] 133 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. 136 137 138[endsect] 139 140[endmathpart] 141 142[/ 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). 147] 148 149 150