All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
lbeta.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_FUN_LBETA_HPP
#define STAN_MATH_PRIM_SCAL_FUN_LBETA_HPP
#include <boost/math/tools/promotion.hpp>
#include <boost/math/special_functions/gamma.hpp>
namespace stan {
namespace math {
template <typename T1, typename T2>
inline typename boost::math::tools::promote_args<T1, T2>::type
lbeta(const T1 a, const T2 b) {
using boost::math::lgamma;
return lgamma(a)
+ lgamma(b)
- lgamma(a + b);
}
}
}
#endif
stan::math::lgamma
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
stan::math::lbeta
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16

[ Stan Home Page ] © 2011–2015, Stan Development Team.