Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
constants.hpp
Go to the documentation of this file.
1 #ifndef STAN__PROB__DISTRIBUTIONS_CONSTANTS_HPP
2 #define STAN__PROB__DISTRIBUTIONS_CONSTANTS_HPP
3 
4 #include <boost/math/constants/constants.hpp>
5 
6 namespace stan {
7 
8  namespace prob {
9 
10 
11  namespace {
12 
13  const double LOG_PI = std::log(boost::math::constants::pi<double>());
14 
15  const double LOG_ZERO = std::log(0.0);
16 
17  const double LOG_TWO = std::log(2.0);
18 
19  const double NEG_LOG_TWO = - LOG_TWO;
20 
21  const double NEG_LOG_SQRT_TWO_PI
22  = - std::log(std::sqrt(2.0 * boost::math::constants::pi<double>()));
23 
24  const double NEG_LOG_PI = - LOG_PI;
25 
26  const double NEG_LOG_SQRT_PI
27  = -std::log(std::sqrt(boost::math::constants::pi<double>()));
28 
29  const double NEG_LOG_TWO_OVER_TWO = - LOG_TWO / 2.0;
30 
31  const double SQRT_2 = std::sqrt(2.0);
32 
33  const double LOG_TWO_PI = LOG_TWO + LOG_PI;
34 
35  const double NEG_LOG_TWO_PI = - LOG_TWO_PI;
36  }
37 
38  }
39 
40 }
41 
42 #endif
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:20
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15

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