Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Phi_approx.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__FUNCTIONS__PHI_APPROX_HPP
2 #define STAN__MATH__FUNCTIONS__PHI_APPROX_HPP
3 
4 #include <boost/math/tools/promotion.hpp>
6 
7 namespace stan {
8  namespace math {
9 
21  template <typename T>
22  inline typename boost::math::tools::promote_args<T>::type
23  Phi_approx(T x) {
24  using std::pow;
25  return inv_logit(0.07056 * pow(x,3.0) + 1.5976 * x);
26  }
27 
28  }
29 }
30 
31 #endif
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:17
boost::math::tools::promote_args< T >::type inv_logit(const T a)
Returns the inverse logit function applied to the argument.
Definition: inv_logit.hpp:52
boost::math::tools::promote_args< T >::type Phi_approx(T x)
Approximation of the unit normal CDF.
Definition: Phi_approx.hpp:23

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