Stan Math Library  2.14.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 
4 #include <boost/math/tools/promotion.hpp>
5 
6 namespace stan {
7  namespace math {
8 
41  inline double logit(double u) {
42  using std::log;
43  return log(u / (1 - u));
44  }
45 
52  inline double logit(int u) {
53  return logit(static_cast<double>(u));
54  }
55 
56  }
57 }
58 #endif
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:14
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:16

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