41 #ifndef PXR_HALF_LIMITS_H 42 #define PXR_HALF_LIMITS_H 52 #include "pxr/base/gf/ilmbase_half.h" 57 class numeric_limits <PXR_NS::pxr_half::half>
60 using half = PXR_NS::pxr_half::half;
64 static const bool is_specialized =
true;
66 static half min () throw () {
return PXR_HALF_NRM_MIN;}
67 static half max () throw () {
return PXR_HALF_MAX;}
69 static const int digits = PXR_HALF_MANT_DIG;
70 static const int digits10 = PXR_HALF_DIG;
71 static const bool is_signed =
true;
72 static const bool is_integer =
false;
73 static const bool is_exact =
false;
74 static const int radix = PXR_HALF_RADIX;
75 static half epsilon () throw () {
return PXR_HALF_EPSILON;}
76 static half round_error () throw () {
return PXR_HALF_EPSILON / 2;}
78 static const int min_exponent = PXR_HALF_MIN_EXP;
79 static const int min_exponent10 = PXR_HALF_MIN_10_EXP;
80 static const int max_exponent = PXR_HALF_MAX_EXP;
81 static const int max_exponent10 = PXR_HALF_MAX_10_EXP;
83 static const bool has_infinity =
true;
84 static const bool has_quiet_NaN =
true;
85 static const bool has_signaling_NaN =
true;
86 static const float_denorm_style has_denorm = denorm_present;
87 static const bool has_denorm_loss =
false;
88 static half infinity () throw () {
return half::posInf();}
89 static half quiet_NaN () throw () {
return half::qNan();}
90 static half signaling_NaN () throw () {
return half::sNan();}
91 static half denorm_min () throw () {
return PXR_HALF_MIN;}
93 static const bool is_iec559 =
false;
94 static const bool is_bounded =
false;
95 static const bool is_modulo =
false;
97 static const bool traps =
true;
98 static const bool tinyness_before =
false;
99 static const float_round_style round_style = round_to_nearest;
101 #if __cplusplus >= 201103L 104 static constexpr
int max_digits10 = PXR_HALF_DECIMAL_DIG;
105 static half lowest () {
return -PXR_HALF_MAX;}