| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
std_numeric_limits.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_STD_NUMERIC_LIMITS_HPP
2 #define STAN_MATH_REV_CORE_STD_NUMERIC_LIMITS_HPP
3
4 #include <stan/math/rev/core/var.hpp>
5 #include <limits>
6
7 namespace std {
8
15 template<>
16 struct numeric_limits<stan::math::var> {
17 static const bool is_specialized = true;
18 static stan::math::var min() { return numeric_limits<double>::min(); }
19 static stan::math::var max() { return numeric_limits<double>::max(); }
20 static const int digits = numeric_limits<double>::digits;
21 static const int digits10 = numeric_limits<double>::digits10;
22 static const bool is_signed = numeric_limits<double>::is_signed;
23 static const bool is_integer = numeric_limits<double>::is_integer;
24 static const bool is_exact = numeric_limits<double>::is_exact;
25 static const int radix = numeric_limits<double>::radix;
26 static stan::math::var epsilon() {
27 return numeric_limits<double>::epsilon();
28 }
29 static stan::math::var round_error() {
30 return numeric_limits<double>::round_error();
31 }
32
33 static const int min_exponent = numeric_limits<double>::min_exponent;
34 static const int min_exponent10 = numeric_limits<double>::min_exponent10;
35 static const int max_exponent = numeric_limits<double>::max_exponent;
36 static const int max_exponent10 = numeric_limits<double>::max_exponent10;
37
38 static const bool has_infinity = numeric_limits<double>::has_infinity;
39 static const bool has_quiet_NaN = numeric_limits<double>::has_quiet_NaN;
40 static const bool has_signaling_NaN
41 = numeric_limits<double>::has_signaling_NaN;
42 static const float_denorm_style has_denorm
43 = numeric_limits<double>::has_denorm;
44 static const bool has_denorm_loss = numeric_limits<double>::has_denorm_loss;
45 static stan::math::var infinity() {
46 return numeric_limits<double>::infinity();
47 }
48 static stan::math::var quiet_NaN() {
49 return numeric_limits<double>::quiet_NaN();
50 }
51 static stan::math::var signaling_NaN() {
52 return numeric_limits<double>::signaling_NaN();
53 }
54 static stan::math::var denorm_min() {
55 return numeric_limits<double>::denorm_min();
56 }
57
58 static const bool is_iec559 = numeric_limits<double>::is_iec559;
59 static const bool is_bounded = numeric_limits<double>::is_bounded;
60 static const bool is_modulo = numeric_limits<double>::is_modulo;
61
62 static const bool traps = numeric_limits<double>::traps;
63 static const bool tinyness_before = numeric_limits<double>::tinyness_before;
64 static const float_round_style round_style
65 = numeric_limits<double>::round_style;
66 };
67
68 }
69 #endif
std::numeric_limits< stan::math::var >::denorm_min
static stan::math::var denorm_min()
Definition: std_numeric_limits.hpp:54
std::numeric_limits< stan::math::var >::min
static stan::math::var min()
Definition: std_numeric_limits.hpp:18
stan::math::min
int min(const std::vector< int > &x)
Returns the minimum coefficient in the specified column vector.
Definition: min.hpp:20
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
std::numeric_limits< stan::math::var >::signaling_NaN
static stan::math::var signaling_NaN()
Definition: std_numeric_limits.hpp:51
std::numeric_limits< stan::math::var >::round_error
static stan::math::var round_error()
Definition: std_numeric_limits.hpp:29
std::numeric_limits< stan::math::var >::quiet_NaN
static stan::math::var quiet_NaN()
Definition: std_numeric_limits.hpp:48
var.hpp
stan::math::max
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
std::numeric_limits< stan::math::var >::epsilon
static stan::math::var epsilon()
Definition: std_numeric_limits.hpp:26
std::numeric_limits< stan::math::var >::max
static stan::math::var max()
Definition: std_numeric_limits.hpp:19
std::numeric_limits< stan::math::var >::infinity
static stan::math::var infinity()
Definition: std_numeric_limits.hpp:45

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