Stan Math Library
5.1.0
Automatic Differentiation
Loading...
Searching...
No Matches
inv_logit.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_FWD_FUN_INV_LOGIT_HPP
2
#define STAN_MATH_FWD_FUN_INV_LOGIT_HPP
3
4
#include <
stan/math/fwd/meta.hpp
>
5
#include <
stan/math/fwd/core.hpp
>
6
#include <
stan/math/prim/fun/inv_logit.hpp
>
7
#include <cmath>
8
9
namespace
stan
{
10
namespace
math {
11
19
template
<
typename
T, require_fvar_t<T>* =
nullptr
>
20
inline
auto
inv_logit
(T&& x) {
21
return
std::decay_t<T>(
inv_logit
(x.val_),
22
x.d_ *
inv_logit
(x.val_) * (1 -
inv_logit
(x.val_)));
23
}
24
25
}
// namespace math
26
}
// namespace stan
27
#endif
core.hpp
meta.hpp
stan::math::inv_logit
auto inv_logit(T &&x)
Returns the inverse logit function applied to the argument.
Definition
inv_logit.hpp:20
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
inv_logit.hpp
stan
math
fwd
fun
inv_logit.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.