1#ifndef STAN_MATH_PRIM_FUN_GAMMA_P_HPP
2#define STAN_MATH_PRIM_FUN_GAMMA_P_HPP
9#include <boost/math/special_functions/gamma.hpp>
67inline double gamma_p(
double z,
double a) {
89template <
typename T1,
typename T2, require_any_container_t<T1, T2>* =
nullptr>
92 [](
auto&& c,
auto&& d) {
93 return gamma_p(std::forward<
decltype(c)>(c),
94 std::forward<
decltype(d)>(d));
96 std::forward<T1>(a), std::forward<T2>(b));
bool is_nan(T &&x)
Returns 1 if the input's value is NaN and 0 otherwise.
void check_nonnegative(const char *function, const char *name, const T_y &y)
Check if y is non-negative.
static constexpr double not_a_number()
Return (quiet) not-a-number.
auto apply_scalar_binary(F &&f, T1 &&x, T2 &&y)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
void check_positive(const char *function, const char *name, const T_y &y)
Check if y is positive.
boost::math::policies::policy< boost::math::policies::overflow_error< boost::math::policies::errno_on_error >, boost::math::policies::pole_error< boost::math::policies::errno_on_error >, boost::math::policies::promote_double< false >, boost::math::policies::digits2< B > > boost_policy_t
Boost policy that overrides the defaults to match the built-in C++ standard library functions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...