Stan Math Library  2.8.0
reverse mode automatic differentiation
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
Phi_approx.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PHI_APPROX_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_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 > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
boost::math::tools::promote_args< T >::type Phi_approx(T x)
Approximation of the unit normal CDF.
Definition: Phi_approx.hpp:23
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18

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