File indexing completed on 2025-01-30 09:45:16
0001
0002
0003
0004
0005
0006 #ifndef BOOST_MATH_COMPLEX_ATAN_INCLUDED
0007 #define BOOST_MATH_COMPLEX_ATAN_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/atanh.hpp>
0014 #endif
0015
0016 namespace boost{ namespace math{
0017
0018 template<class T>
0019 [[deprecated("Replaced by C++11")]] std::complex<T> atan(const std::complex<T>& x)
0020 {
0021
0022
0023
0024 if(x.real() == 0)
0025 {
0026 if(x.imag() == 1)
0027 return std::complex<T>(0, std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : static_cast<T>(HUGE_VAL));
0028 if(x.imag() == -1)
0029 return std::complex<T>(0, std::numeric_limits<T>::has_infinity ? -std::numeric_limits<T>::infinity() : -static_cast<T>(HUGE_VAL));
0030 }
0031 return ::boost::math::detail::mult_minus_i(::boost::math::atanh(::boost::math::detail::mult_i(x)));
0032 }
0033
0034 } }
0035
0036 #endif