annotate DEPENDENCIES/generic/include/boost/math/complex/acosh.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // (C) Copyright John Maddock 2005.
Chris@16 2 // Use, modification and distribution are subject to the
Chris@16 3 // Boost Software License, Version 1.0. (See accompanying file
Chris@16 4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5
Chris@16 6 #ifndef BOOST_MATH_COMPLEX_ACOSH_INCLUDED
Chris@16 7 #define BOOST_MATH_COMPLEX_ACOSH_INCLUDED
Chris@16 8
Chris@16 9 #ifndef BOOST_MATH_COMPLEX_DETAILS_INCLUDED
Chris@16 10 # include <boost/math/complex/details.hpp>
Chris@16 11 #endif
Chris@16 12 #ifndef BOOST_MATH_COMPLEX_ATANH_INCLUDED
Chris@16 13 # include <boost/math/complex/acos.hpp>
Chris@16 14 #endif
Chris@16 15
Chris@16 16 namespace boost{ namespace math{
Chris@16 17
Chris@16 18 template<class T>
Chris@16 19 inline std::complex<T> acosh(const std::complex<T>& z)
Chris@16 20 {
Chris@16 21 //
Chris@16 22 // We use the relation acosh(z) = +-i acos(z)
Chris@16 23 // Choosing the sign of multiplier to give real(acosh(z)) >= 0
Chris@16 24 // as well as compatibility with C99.
Chris@16 25 //
Chris@16 26 std::complex<T> result = boost::math::acos(z);
Chris@16 27 if(!(boost::math::isnan)(result.imag()) && signbit(result.imag()))
Chris@16 28 return detail::mult_i(result);
Chris@16 29 return detail::mult_minus_i(result);
Chris@16 30 }
Chris@16 31
Chris@16 32 } } // namespaces
Chris@16 33
Chris@16 34 #endif // BOOST_MATH_COMPLEX_ACOSH_INCLUDED