Stan Math Library  2.20.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 
4 #include <stan/math/rev/meta.hpp>
7 #include <stan/math/rev/core.hpp>
9 
10 namespace stan {
11 namespace math {
12 
20 inline var log1m_inv_logit(const var& u) {
21  return var(
22  new precomp_v_vari(log1m_inv_logit(u.val()), u.vi_, -inv_logit(u.val())));
23 }
24 
25 } // namespace math
26 } // namespace stan
27 #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:33
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:45
double val() const
Return the value of this variable.
Definition: var.hpp:294

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