📄 vnl_numeric_limits.h
字号:
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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vnl_numeric_limits<long>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x7fffffff; }
inline static int max() { return 0x7fffffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(9);
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(-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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vnl_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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vnl_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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vnl_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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_toward_zero);
};
//-------------------- #include <vnl/vnl_numeric_limits_float.h>
// IEEE 754 single precision
VCL_DEFINE_SPECIALIZATION
class vnl_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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_to_nearest);
};
//-------------------- #include <vnl/vnl_numeric_limits_double.h>
// IEEE 754 double precision with denorm
VCL_DEFINE_SPECIALIZATION
class vnl_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 vnl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vnl_round_to_nearest);
};
#endif // vnl_numeric_limits_h_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -