Stan Math Library  2.20.0
reverse mode automatic differentiation
logit.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGIT_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGIT_HPP
3 
5 #include <cmath>
6 
7 namespace stan {
8 namespace math {
9 
42 inline double logit(double u) {
43  using std::log;
44  return log(u / (1 - u));
45 }
46 
53 inline double logit(int u) { return logit(static_cast<double>(u)); }
54 
55 } // namespace math
56 } // namespace stan
57 #endif
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:12
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:14

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