1 #ifndef STAN_MATH_FWD_SCAL_FUN_BINOMIAL_COEFFICIENT_LOG_HPP 2 #define STAN_MATH_FWD_SCAL_FUN_BINOMIAL_COEFFICIENT_LOG_HPP 7 #include <boost/math/special_functions/digamma.hpp> 17 const double cutoff = 1000;
18 if ((x1.
val_ < cutoff) || (x1.
val_ - x2.
val_ < cutoff)) {
42 const double cutoff = 1000;
43 if ((x1.
val_ < cutoff) || (x1.
val_ - x2 < cutoff)) {
49 x2 * x1.
d_ / (x1.
val_ - x2)
55 + x1.
d_ / (12.0 * (x1.
val_ - x2) * (x1.
val_ - x2)));
63 const double cutoff = 1000;
64 if ((x1 < cutoff) || (x1 - x2.
val_ < cutoff)) {
72 - x2.
d_ / (12.0 * (x1 - x2.
val_) * (x1 - x2.
val_))
73 + x2.
d_ * (x1 + 0.5) / (x1 - x2.
val_)
T d_
The tangent (derivative) of this variable.
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
fvar< T > log(const fvar< T > &x)
T val_
The value of this variable.
This template class represents scalars used in forward-mode automatic differentiation, which consist of values and directional derivatives of the specified template type.
fvar< T > digamma(const fvar< T > &x)
Return the derivative of the log gamma function at the specified argument.