Automatic Differentiation
 
Loading...
Searching...
No Matches
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
5#include <limits>
6
7namespace std {
8
15template <typename T>
16struct numeric_limits<stan::math::var_value<T>> {
18 static constexpr bool is_specialized = true;
19 static constexpr stan::math::var_value<T> min() noexcept {
20 return numeric_limits<value_type>::min();
21 }
22 static constexpr stan::math::var_value<T> max() noexcept {
23 return numeric_limits<value_type>::max();
24 }
25 static constexpr int digits = numeric_limits<value_type>::digits;
26 static constexpr int digits10 = numeric_limits<value_type>::digits10;
27 static constexpr int max_digits10 = numeric_limits<value_type>::max_digits10;
28 static constexpr bool is_signed = numeric_limits<value_type>::is_signed;
29 static constexpr bool is_integer = numeric_limits<value_type>::is_integer;
30 static constexpr bool is_exact = numeric_limits<value_type>::is_exact;
31 static constexpr int radix = numeric_limits<value_type>::radix;
32 static constexpr stan::math::var_value<T> epsilon() noexcept {
33 return numeric_limits<value_type>::epsilon();
34 }
35 static constexpr stan::math::var_value<T> round_error() noexcept {
36 return numeric_limits<value_type>::round_error();
37 }
38 static constexpr T lowest() noexcept {
39 return numeric_limits<value_type>::lowest();
40 };
41
42 static constexpr int min_exponent = numeric_limits<value_type>::min_exponent;
43 static constexpr int min_exponent10
44 = numeric_limits<value_type>::min_exponent10;
45 static constexpr int max_exponent = numeric_limits<value_type>::max_exponent;
46 static constexpr int max_exponent10
47 = numeric_limits<value_type>::max_exponent10;
48
49 static constexpr bool has_infinity = numeric_limits<value_type>::has_infinity;
50 static constexpr bool has_quiet_NaN
51 = numeric_limits<value_type>::has_quiet_NaN;
52 static constexpr bool has_signaling_NaN
53 = numeric_limits<value_type>::has_signaling_NaN;
54 static constexpr float_denorm_style has_denorm
55 = numeric_limits<value_type>::has_denorm;
56 static constexpr bool has_denorm_loss
57 = numeric_limits<value_type>::has_denorm_loss;
58 static constexpr stan::math::var_value<T> infinity() noexcept {
59 return numeric_limits<value_type>::infinity();
60 }
61 static constexpr stan::math::var_value<T> quiet_NaN() noexcept {
62 return numeric_limits<value_type>::quiet_NaN();
63 }
64 static constexpr stan::math::var_value<T> signaling_NaN() noexcept {
65 return numeric_limits<value_type>::signaling_NaN();
66 }
67 static constexpr stan::math::var_value<T> denorm_min() noexcept {
68 return numeric_limits<value_type>::denorm_min();
69 }
70
71 static constexpr bool is_iec559 = numeric_limits<value_type>::is_iec559;
72 static constexpr bool is_bounded = numeric_limits<value_type>::is_bounded;
73 static constexpr bool is_modulo = numeric_limits<value_type>::is_modulo;
74
75 static constexpr bool traps = numeric_limits<value_type>::traps;
76 static constexpr bool tinyness_before
77 = numeric_limits<value_type>::tinyness_before;
78 static constexpr float_round_style round_style
79 = numeric_limits<value_type>::round_style;
80};
81
82} // namespace std
83#endif
typename boost::math::tools::promote_args< Args... >::type promote_args_t
Convenience alias for boost tools promote_args.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9
STL namespace.
static constexpr stan::math::var_value< T > denorm_min() noexcept
static constexpr stan::math::var_value< T > round_error() noexcept
static constexpr stan::math::var_value< T > quiet_NaN() noexcept
static constexpr stan::math::var_value< T > max() noexcept
static constexpr stan::math::var_value< T > epsilon() noexcept
static constexpr stan::math::var_value< T > infinity() noexcept
static constexpr stan::math::var_value< T > signaling_NaN() noexcept
static constexpr stan::math::var_value< T > min() noexcept