Automatic Differentiation
 
Loading...
Searching...
No Matches
log_cosh.hpp File Reference

Go to the source code of this file.

Classes

struct  stan::math::log_cosh_fun
 Structure to wrap log_cosh() so it can be vectorized. More...
 

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename T , require_arithmetic_t< T > * = nullptr>
double stan::math::log_cosh (T x)
 Return the natural logarithm of the hyperbolic cosine of the argument, from expm1 for |x| < 1 and from exp(-|x|) above, so that neither branch subtracts two nearly equal numbers or overflows.
 
template<typename T , require_container_t< T > * = nullptr, require_not_var_matrix_t< T > * = nullptr, require_not_nonscalar_prim_or_rev_kernel_expression_t< T > * = nullptr>
auto stan::math::log_cosh (T &&x)
 Return the elementwise log_cosh() of the specified container.