Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:33

0001 //  (C) Copyright John Maddock 2005.
0002 //  Use, modification and distribution are subject to the
0003 //  Boost Software License, Version 1.0. (See accompanying file
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_MATH_COMPLEX_ACOSH_INCLUDED
0007 #define BOOST_MATH_COMPLEX_ACOSH_INCLUDED
0008 
0009 #ifndef BOOST_MATH_COMPLEX_DETAILS_INCLUDED
0010 #  include <boost/math/complex/details.hpp>
0011 #endif
0012 #ifndef BOOST_MATH_COMPLEX_ATANH_INCLUDED
0013 #  include <boost/math/complex/acos.hpp>
0014 #endif
0015 
0016 namespace boost{ namespace math{
0017 
0018 template<class T> 
0019 [[deprecated("Replaced by C++11")]] inline std::complex<T> acosh(const std::complex<T>& z)
0020 {
0021    //
0022    // We use the relation acosh(z) = +-i acos(z)
0023    // Choosing the sign of multiplier to give real(acosh(z)) >= 0
0024    // as well as compatibility with C99.
0025    //
0026    std::complex<T> result = boost::math::acos(z);
0027    if(!(boost::math::isnan)(result.imag()) && signbit(result.imag()))
0028       return detail::mult_i(result);
0029    return detail::mult_minus_i(result);
0030 }
0031 
0032 } } // namespaces
0033 
0034 #endif // BOOST_MATH_COMPLEX_ACOSH_INCLUDED