limits.mh
来自「开放源码的编译器open watcom 1.6.0版的源代码」· MH 代码 · 共 859 行 · 第 1/3 页
MH
859 行
static const int digits10 = 18;
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static long long epsilon() { return( 0 ); }
static long long round_error() { return( 0 ); }
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_absent;
static const bool has_denorm_loss = false;
static long long infinity() { return( 0 ); }
static long long quiet_NaN() { return( 0 ); }
static long long signaling_NaN() { return( 0 ); }
static long long denorm_min() { return( 0 ); }
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
#endif
// template< >
class numeric_limits< unsigned short > {
public:
static const bool is_specialized = true;
static unsigned short min() { return( 0 ); }
static unsigned short max() { return( USHRT_MAX ); }
static const int digits = 16;
static const int digits10 = 4;
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static unsigned short epsilon() { return( 0 ); }
static unsigned short round_error() { return( 0 ); }
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_absent;
static const bool has_denorm_loss = false;
static unsigned short infinity() { return( 0 ); }
static unsigned short quiet_NaN() { return( 0 ); }
static unsigned short signaling_NaN() { return( 0 ); }
static unsigned short denorm_min() { return( 0 ); }
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
// template< >
class numeric_limits< unsigned int > {
public:
static const bool is_specialized = true;
static unsigned int min() { return( 0 ); }
static unsigned int max() { return( UINT_MAX ); }
#if defined(__386__) || defined(__AXP__) || defined(__PPC__) || defined(__MIPS__)
static const int digits = 32;
static const int digits10 = 9;
#else
static const int digits = 16;
static const int digits10 = 4;
#endif
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static unsigned int epsilon() { return( 0 ); }
static unsigned int round_error() { return( 0 ); }
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_absent;
static const bool has_denorm_loss = false;
static unsigned int infinity() { return( 0 ); }
static unsigned int quiet_NaN() { return( 0 ); }
static unsigned int signaling_NaN() { return( 0 ); }
static unsigned int denorm_min() { return( 0 ); }
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
// template< >
class numeric_limits< unsigned long > {
public:
static const bool is_specialized = true;
static unsigned long min() { return( 0 ); }
static unsigned long max() { return( ULONG_MAX ); }
static const int digits = 32;
static const int digits10 = 9;
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static unsigned long epsilon() { return( 0 ); }
static unsigned long round_error() { return( 0 ); }
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_absent;
static const bool has_denorm_loss = false;
static unsigned long infinity() { return( 0 ); }
static unsigned long quiet_NaN() { return( 0 ); }
static unsigned long signaling_NaN() { return( 0 ); }
static unsigned long denorm_min() { return( 0 ); }
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
#ifdef __WATCOM_INT64__
// template< >
class numeric_limits< unsigned long long > {
public:
static const bool is_specialized = true;
static unsigned long long min() { return( 0 ); }
static unsigned long long max() { return( ULLONG_MAX ); }
static const int digits = 64;
static const int digits10 = 19;
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static unsigned long long epsilon() { return( 0 ); }
static unsigned long long round_error() { return( 0 ); }
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_absent;
static const bool has_denorm_loss = false;
static unsigned long long infinity() { return( 0 ); }
static unsigned long long quiet_NaN() { return( 0 ); }
static unsigned long long signaling_NaN() { return( 0 ); }
static unsigned long long denorm_min() { return( 0 ); }
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
#endif
// template< >
class numeric_limits< float > {
public:
static const bool is_specialized = true;
static float min() { return( FLT_MIN ); }
static float max() { return( FLT_MAX ); }
static const int digits = FLT_MANT_DIG;
static const int digits10 = FLT_DIG;
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = FLT_RADIX;
static float epsilon() { return( FLT_EPSILON ); }
static float round_error() { return( 0.5F ); }
static const int min_exponent = FLT_MIN_EXP;
static const int min_exponent10 = FLT_MIN_10_EXP;
static const int max_exponent = FLT_MAX_EXP;
static const int max_exponent10 = FLT_MAX_10_EXP;
static const bool has_infinity = true;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_indeterminate;
static const bool has_denorm_loss = false;
static float infinity();
static float quiet_NaN();
static float signaling_NaN();
static float denorm_min();
static const bool is_iec559 = true;
static const bool is_bounded = true;
static const bool is_modulo = false;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_to_nearest;
};
// template< >
class numeric_limits< double > {
public:
static const bool is_specialized = true;
static double min() { return( DBL_MIN ); }
static double max() { return( DBL_MAX ); }
static const int digits = DBL_MANT_DIG;
static const int digits10 = DBL_DIG;
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = _DBL_RADIX;
static double epsilon() { return( DBL_EPSILON ); }
static double round_error() { return( 0.5 ); }
static const int min_exponent = DBL_MIN_EXP;
static const int min_exponent10 = DBL_MIN_10_EXP;
static const int max_exponent = DBL_MAX_EXP;
static const int max_exponent10 = DBL_MAX_10_EXP;
static const bool has_infinity = true;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_indeterminate;
static const bool has_denorm_loss = false;
static double infinity();
static double quiet_NaN();
static double signaling_NaN();
static double denorm_min();
static const bool is_iec559 = true;
static const bool is_bounded = true;
static const bool is_modulo = false;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_to_nearest;
};
// template< >
class numeric_limits< long double > {
public:
static const bool is_specialized = true;
static long double min() { return( LDBL_MIN ); }
static long double max() { return( LDBL_MAX ); }
static const int digits = LDBL_MANT_DIG;
static const int digits10 = LDBL_DIG;
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = _LDBL_RADIX;
static long double epsilon() { return( LDBL_EPSILON ); }
static long double round_error() { return( 0.5L ); }
static const int min_exponent = LDBL_MIN_EXP;
static const int min_exponent10 = LDBL_MIN_10_EXP;
static const int max_exponent = LDBL_MAX_EXP;
static const int max_exponent10 = LDBL_MAX_10_EXP;
static const bool has_infinity = true;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_indeterminate;
static const bool has_denorm_loss = false;
static long double infinity();
static long double quiet_NaN();
static long double signaling_NaN();
static long double denorm_min();
static const bool is_iec559 = true;
static const bool is_bounded = true;
static const bool is_modulo = false;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_to_nearest;
};
} // namespace std
#endif
:endsegment
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?