Stan
1.3
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Pages
src
stan
math
functions
lbeta.hpp
Go to the documentation of this file.
1
#ifndef __STAN__MATH__FUNCTIONS__LBETA_HPP__
2
#define __STAN__MATH__FUNCTIONS__LBETA_HPP__
3
4
#include <boost/math/tools/promotion.hpp>
5
6
#include <boost/math/special_functions/gamma.hpp>
7
8
namespace
stan {
9
namespace
math {
10
32
template
<
typename
T1,
typename
T2>
33
inline
typename
boost::math::tools::promote_args<T1,T2>::type
34
lbeta
(
const
T1 a,
const
T2 b) {
35
using
boost::math::lgamma
;
36
return
lgamma
(a)
37
+
lgamma
(b)
38
-
lgamma
(a + b);
39
}
40
41
}
42
}
43
44
#endif
[
Stan Home Page
]
© 2011–2013, Stan Development Team.