Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
logit.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__FUNCTIONS__LOGIT_HPP
2 #define STAN__MATH__FUNCTIONS__LOGIT_HPP
3 
4 #include <boost/math/tools/promotion.hpp>
5 
6 namespace stan {
7  namespace math {
8 
42  template <typename T>
43  inline typename boost::math::tools::promote_args<T>::type
44  logit(const T a) {
45  using std::log;
46  return log(a / (1.0 - a));
47  }
48 
49  }
50 }
51 
52 #endif
boost::math::tools::promote_args< T >::type logit(const T a)
Returns the logit function applied to the argument.
Definition: logit.hpp:44
Eigen::Matrix< T, Rows, Cols > log(const Eigen::Matrix< T, Rows, Cols > &m)
Return the element-wise logarithm of the matrix or vector.
Definition: log.hpp:16
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15

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