1#ifndef STAN_MATH_PRIM_FUN_ACOS_HPP
2#define STAN_MATH_PRIM_FUN_ACOS_HPP
28template <
typename T, require_arithmetic_t<T>* =
nullptr>
40template <
typename T, require_complex_bt<std::is_arithmetic, T>* =
nullptr>
41inline auto acos(T&& x) {
54 static inline auto fun(T&& x) {
55 return acos(std::forward<T>(x));
67template <
typename Container, require_ad_container_t<Container>* =
nullptr>
68inline auto acos(Container&& x) {
70 std::forward<Container>(x));
81template <
typename Container,
83inline auto acos(Container&& x) {
84 return apply_vector_unary<Container>::apply(
85 std::forward<Container>(x), [](
auto&& v) {
return v.array().
acos(); });
98 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 ...
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...