Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Phi.hpp
Go to the documentation of this file.
1 #ifndef __STAN__MATH__FUNCTIONS__PHI_HPP__
2 #define __STAN__MATH__FUNCTIONS__PHI_HPP__
3 
4 #include <boost/math/tools/promotion.hpp>
5 #include <boost/math/special_functions/erf.hpp>
7 
8 namespace stan {
9  namespace math {
10 
26  template <typename T>
27  inline typename boost::math::tools::promote_args<T>::type
28  Phi(const T x) {
29  return 0.5 * (1.0 + boost::math::erf(INV_SQRT_2 * x));
30  }
31 
32  }
33 }
34 
35 #endif

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