1#ifndef STAN_MATH_PRIM_FUN_ACOSH_HPP
2#define STAN_MATH_PRIM_FUN_ACOSH_HPP
26template <
typename T, require_arithmetic_t<T>* =
nullptr>
48template <
typename T, require_complex_bt<std::is_arithmetic, T>* =
nullptr>
65 static inline auto fun(T&& x) {
66 return acosh(std::forward<T>(x));
80template <
typename T, require_ad_container_t<T>* =
nullptr>
81inline auto acosh(T&& x) {
82 return apply_scalar_unary<acosh_fun, T>::apply(std::forward<T>(x));
95template <
typename Container,
96 require_container_bt<std::is_arithmetic, Container>* =
nullptr>
97inline auto acosh(Container&& x) {
99 std::forward<Container>(x));
114 auto y =
log(z +
sqrt(z * z - 1));
double copysign(double a, double_d b)
std::complex< V > complex_acosh(const std::complex< V > &z)
Return the hyperbolic arc cosine of the complex argument.
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
fvar< T > acosh(const fvar< T > &x)
bool is_nan(T &&x)
Returns 1 if the input's value is NaN and 0 otherwise.
fvar< T > log(const fvar< T > &x)
void check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low, Idxs... idxs)
Throw an exception if y is not greater or equal than low.
fvar< T > sqrt(const fvar< T > &x)
int is_inf(const fvar< T > &x)
Returns 1 if the input's value is infinite and 0 otherwise.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
static auto fun(T &&x)
Return the inverse hyperbolic cosine of the specified argument.
Structure to wrap acosh() so it can be vectorized.
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...