1#ifndef STAN_MATH_PRIM_FUN_ACOS_HPP
2#define STAN_MATH_PRIM_FUN_ACOS_HPP
28template <
typename T, require_arithmetic_t<T>* =
nullptr>
29inline auto acos(
const T x) {
40template <
typename T, require_complex_bt<std::is_arithmetic, T>* =
nullptr>
41inline auto acos(
const T x) {
54 static inline auto fun(
const T& x) {
67template <
typename Container, require_ad_container_t<Container>* =
nullptr>
68inline auto acos(
const Container& x) {
80template <
typename Container,
82inline auto acos(
const Container& x) {
83 return apply_vector_unary<Container>::apply(
84 x, [](
const auto& v) {
return v.array().
acos(); });
97 return 0.5 *
pi() -
asin(x);
require_t< container_type_check_base< is_container, base_type_t, TypeCheck, Check... > > require_container_bt
Require type satisfies is_container.
std::complex< V > complex_acos(const std::complex< V > &x)
Return the arc cosine of the complex argument.
fvar< T > acos(const fvar< T > &x)
static constexpr double pi()
Return the value of pi.
fvar< T > asin(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
static auto fun(const T &x)
Structure to wrap acos() so it can be vectorized.
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...