1 # ifndef CPPAD_CORE_ATANH_HPP
2 # define CPPAD_CORE_ATANH_HPP
67 # include <cppad/configure.hpp>
68 # if ! CPPAD_USE_CPLUSPLUS_2011
74 Type atanh_template(
const Type &x)
75 {
return CppAD::log( (Type(1) + x) / (Type(1) - x) ) / Type(2);
78 inline float atanh(
const float &x)
79 {
return atanh_template(x); }
81 inline double atanh(
const double &x)
82 {
return atanh_template(x); }
85 inline AD<Base>
atanh(
const AD<Base> &x)
86 {
return atanh_template(x); }
89 inline AD<Base>
atanh(
const VecAD_reference<Base> &x)
90 {
return atanh_template( x.ADBase() ); }
95 # endif // CPPAD_USE_CPLUSPLUS_2011
96 # endif // CPPAD_ATANH_INCLUDED
AD< Base > log(const AD< Base > &x)
std::complex< double > atanh(const std::complex< double > &x)