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>
90inline auto gamma_p(
const T1& a,
const T2& b) {
92 a, b, [&](
const auto& c,
const auto& d) {
return gamma_p(c, d); });
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.
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.
auto apply_scalar_binary(const T1 &x, const T2 &y, const F &f)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...