1#ifndef STAN_MATH_PRIM_FUN_MINUS_HPP
2#define STAN_MATH_PRIM_FUN_MINUS_HPP
17template <
typename T, require_not_std_vector_t<T>* =
nullptr>
19 return make_holder([](
auto&& x_) {
return -x_; }, std::forward<T>(x));
29template <
typename T, require_std_vector_t<T>* =
nullptr>
30inline auto minus(T&& x) {
31 return apply_vector_unary<T>::apply(std::forward<T>(x),
32 [](
auto&& v) {
return -v; });
auto minus(T &&x)
Returns the negation of the specified scalar or matrix.
auto make_holder(F &&func, Args &&... args)
Calls given function with given arguments.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...