sl@0
|
1 |
// (C) Copyright John Maddock 2005.
|
sl@0
|
2 |
// Use, modification and distribution are subject to the
|
sl@0
|
3 |
// Boost Software License, Version 1.0. (See accompanying file
|
sl@0
|
4 |
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
5 |
|
sl@0
|
6 |
#ifndef BOOST_MATH_COMPLEX_ASINH_INCLUDED
|
sl@0
|
7 |
#define BOOST_MATH_COMPLEX_ASINH_INCLUDED
|
sl@0
|
8 |
|
sl@0
|
9 |
#ifndef BOOST_MATH_COMPLEX_DETAILS_INCLUDED
|
sl@0
|
10 |
# include <boost/math/complex/details.hpp>
|
sl@0
|
11 |
#endif
|
sl@0
|
12 |
#ifndef BOOST_MATH_COMPLEX_ASINH_INCLUDED
|
sl@0
|
13 |
# include <boost/math/complex/asinh.hpp>
|
sl@0
|
14 |
#endif
|
sl@0
|
15 |
|
sl@0
|
16 |
namespace boost{ namespace math{
|
sl@0
|
17 |
|
sl@0
|
18 |
template<class T>
|
sl@0
|
19 |
inline std::complex<T> asinh(const std::complex<T>& x)
|
sl@0
|
20 |
{
|
sl@0
|
21 |
//
|
sl@0
|
22 |
// We use asinh(z) = i asin(-i z);
|
sl@0
|
23 |
// Note that C99 defines this the other way around (which is
|
sl@0
|
24 |
// to say asin is specified in terms of asinh), this is consistent
|
sl@0
|
25 |
// with C99 though:
|
sl@0
|
26 |
//
|
sl@0
|
27 |
return ::boost::math::detail::mult_i(::boost::math::asin(::boost::math::detail::mult_minus_i(x)));
|
sl@0
|
28 |
}
|
sl@0
|
29 |
|
sl@0
|
30 |
} } // namespaces
|
sl@0
|
31 |
|
sl@0
|
32 |
#endif // BOOST_MATH_COMPLEX_ASINH_INCLUDED
|