Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef INCLUDED_HALF_LIMITS_H
00042 #define INCLUDED_HALF_LIMITS_H
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifdef HAVE_STL_LIMITS
00052 #include <limits>
00053 #include "half.h"
00054
00055 namespace std {
00056
00057 template <>
00058 class numeric_limits <half>
00059 {
00060 public:
00061
00062 static const bool is_specialized = true;
00063
00064 static half min () throw () {return HALF_NRM_MIN;}
00065 static half max () throw () {return HALF_MAX;}
00066
00067 static const int digits = HALF_MANT_DIG;
00068 static const int digits10 = HALF_DIG;
00069 static const bool is_signed = true;
00070 static const bool is_integer = false;
00071 static const bool is_exact = false;
00072 static const int radix = HALF_RADIX;
00073 static half epsilon () throw () {return HALF_EPSILON;}
00074 static half round_error () throw () {return HALF_EPSILON / 2;}
00075
00076 static const int min_exponent = HALF_MIN_EXP;
00077 static const int min_exponent10 = HALF_MIN_10_EXP;
00078 static const int max_exponent = HALF_MAX_EXP;
00079 static const int max_exponent10 = HALF_MAX_10_EXP;
00080
00081 static const bool has_infinity = true;
00082 static const bool has_quiet_NaN = true;
00083 static const bool has_signaling_NaN = true;
00084 static const float_denorm_style has_denorm = denorm_present;
00085 static const bool has_denorm_loss = false;
00086 static half infinity () throw () {return half::posInf();}
00087 static half quiet_NaN () throw () {return half::qNan();}
00088 static half signaling_NaN () throw () {return half::sNan();}
00089 static half denorm_min () throw () {return HALF_MIN;}
00090
00091 static const bool is_iec559 = false;
00092 static const bool is_bounded = false;
00093 static const bool is_modulo = false;
00094
00095 static const bool traps = true;
00096 static const bool tinyness_before = false;
00097 static const float_round_style round_style = round_to_nearest;
00098 };
00099
00100
00101 }
00102
00103 #endif
00104 #endif