1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/math/complex/acosh.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,34 @@
1.4 +// (C) Copyright John Maddock 2005.
1.5 +// Use, modification and distribution are subject to the
1.6 +// Boost Software License, Version 1.0. (See accompanying file
1.7 +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1.8 +
1.9 +#ifndef BOOST_MATH_COMPLEX_ACOSH_INCLUDED
1.10 +#define BOOST_MATH_COMPLEX_ACOSH_INCLUDED
1.11 +
1.12 +#ifndef BOOST_MATH_COMPLEX_DETAILS_INCLUDED
1.13 +# include <boost/math/complex/details.hpp>
1.14 +#endif
1.15 +#ifndef BOOST_MATH_COMPLEX_ATANH_INCLUDED
1.16 +# include <boost/math/complex/acos.hpp>
1.17 +#endif
1.18 +
1.19 +namespace boost{ namespace math{
1.20 +
1.21 +template<class T>
1.22 +inline std::complex<T> acosh(const std::complex<T>& z)
1.23 +{
1.24 + //
1.25 + // We use the relation acosh(z) = +-i acos(z)
1.26 + // Choosing the sign of multiplier to give real(acosh(z)) >= 0
1.27 + // as well as compatibility with C99.
1.28 + //
1.29 + std::complex<T> result = boost::math::acos(z);
1.30 + if(!detail::test_is_nan(result.imag()) && result.imag() <= 0)
1.31 + return detail::mult_i(result);
1.32 + return detail::mult_minus_i(result);
1.33 +}
1.34 +
1.35 +} } // namespaces
1.36 +
1.37 +#endif // BOOST_MATH_COMPLEX_ACOSH_INCLUDED