All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
lgamma.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_FWD_SCAL_FUN_LGAMMA_HPP
#define STAN_MATH_FWD_SCAL_FUN_LGAMMA_HPP
#include <stan/math/fwd/core.hpp>
#include <boost/math/special_functions/digamma.hpp>
namespace stan {
namespace math {
template <typename T>
inline
fvar<T>
lgamma(const fvar<T>& x) {
using boost::math::digamma;
using boost::math::lgamma;
return fvar<T>(lgamma(x.val_), x.d_ * digamma(x.val_));
}
}
}
#endif
core.hpp
stan::math::fvar::d_
T d_
Definition: fvar.hpp:15
stan::math::lgamma
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
stan::math::lgamma
var lgamma(const stan::math::var &a)
The log gamma function for variables (C99).
Definition: lgamma.hpp:35
stan::math::fvar::val_
T val_
Definition: fvar.hpp:14
stan::math::fvar
Definition: fvar.hpp:13
stan::math::digamma
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16

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