vcl_limits.h
来自「DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.」· C头文件 代码 · 共 608 行 · 第 1/2 页
H
608 行
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned long>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static unsigned int min() { return 0; }
inline static unsigned int max() { return 0xffffffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(sizeof(unsigned long) * 8 );
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL( (digits * 301) / 1000 );
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned short >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static unsigned int min() { return 0; }
inline static unsigned int max() { return 0xffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(sizeof(unsigned short) * 8 );
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL( (digits * 301) / 1000 );
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<short >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x7fff; }
inline static int max() { return 0x7fff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-15);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-5);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<signed char >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x80; }
inline static int max() { return 0x7f; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(7);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(3);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-15);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-5);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned char >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return 0x0; }
inline static int max() { return 0xff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(8);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(3);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-15);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-5);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
#if VCL_CHAR_IS_SIGNED
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<char>: public vcl_numeric_limits<signed char> {};
#else
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<char>: public vcl_numeric_limits<unsigned char> {};
#endif
// IEEE 754 single precision
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<float>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static float min() { return 1.17549435E-38F; }
inline static float max() { return 3.40282347E+38F; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(24);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(6);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(false);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static float epsilon() { return 1.19209290E-07F; }
inline static float round_error() { return 0.5F; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-125);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-37);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(128);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(38);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static float infinity();
static float quiet_NaN();
static float signaling_NaN();
inline static float denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(true);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_to_nearest);
};
// IEEE 754 double precision with denorm
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<double>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static double min() { return 2.2250738585072014e-308; }
inline static double max() { return 1.7976931348623157e+308; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(53);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(15);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(false);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static double epsilon() { return 2.220446049250313e-16; }
inline static double round_error() { return 0.5; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-1021);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-307);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(1024);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(308);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static double infinity();
static double quiet_NaN();
static double signaling_NaN();
inline static double denorm_min() { return /* 5e-324 */ min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(true);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_to_nearest);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<long double>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static long double max() { return 1.7976931348623157e+308; }
inline static long double min() { return 2.2250738585072014e-308; }
inline static long double denorm_min() { return min(); }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(53);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(15);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(false);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static long double epsilon() { return 2.220446049250313e-16; } // TODO: should become dependent of sizeof(long double)
inline static long double round_error() { return 0.5; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-1021);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-307);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(1024);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(308);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static long double infinity();
static long double quiet_NaN();
static long double signaling_NaN();
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(true);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_to_nearest);
};
#endif // emulation_vcl_limits_h_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?