Stan Math Library  2.15.0
reverse mode automatic differentiation
log1m_inv_logit.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG1M_INV_LOGIT_HPP
2 #define STAN_MATH_REV_SCAL_FUN_LOG1M_INV_LOGIT_HPP
3 
6 #include <stan/math/rev/core.hpp>
8 
9 namespace stan {
10  namespace math {
11 
19  inline var log1m_inv_logit(const var& u) {
20  return var(new precomp_v_vari(log1m_inv_logit(u.val()),
21  u.vi_, -inv_logit(u.val())));
22  }
23 
24  }
25 }
26 #endif
fvar< T > log1m_inv_logit(const fvar< T > &x)
Return the natural logarithm of one minus the inverse logit of the specified argument.
fvar< T > inv_logit(const fvar< T > &x)
Returns the inverse logit function applied to the argument.
Definition: inv_logit.hpp:20
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:30
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:42
double val() const
Return the value of this variable.
Definition: var.hpp:230

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