C numeric limits interface
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
见也
numeric_limits接口.| 在头文件
<cstdint> 中定义 | |
| PTRDIFF_MIN (C++11) |
最小值std::ptrdiff_t类型的对象 原文: minimum value of object of std::ptrdiff_t type (常量宏) |
| PTRDIFF_MAX (C++11) |
std::ptrdiff_t类型的对象的最大值 原文: maximum value of object of std::ptrdiff_t type (常量宏) |
| SIZE_MAX (C++11) |
std::size_t类型的对象的最大值 原文: maximum value of object of std::size_t type (常量宏) |
| SIG_ATOMIC_MIN (C++11) |
std::sig_atomic_t类型的对象的最大值 原文: maximum value of object of std::sig_atomic_t type (常量宏) |
| SIG_ATOMIC_MAX (C++11) |
std::sig_atomic_t类型的对象的最大值 原文: maximum value of object of std::sig_atomic_t type (常量宏) |
| WCHAR_MIN (C++11) |
wchar_t类型的对象的最大值 原文: maximum value of object of wchar_t type (常量宏) |
| WCHAR_MAX (C++11) |
wchar_t类型的对象的最大值 原文: maximum value of object of wchar_t type (常量宏) |
| WINT_MIN (C++11) |
std::wint_t类型的对象的最大值 原文: maximum value of object of std::wint_t type (常量宏) |
| WINT_MAX (C++11) |
std::wint_t类型的对象的最大值 原文: maximum value of object of std::wint_t type (常量宏) |
[编辑] 整数类型的限制
| 在头文件
<climits> 中定义 | |
| CHAR_BIT |
在字节的比特数 (常量宏) |
| MB_LEN_MAX |
多字节字符的最大字节数 原文: maximum number of bytes in a multibyte character (常量宏) |
| CHAR_MIN |
char最小值 (常量宏) |
| CHAR_MAX |
char的最大值 (常量宏) |
| SCHAR_MIN SHRT_MIN INT_MIN LONG_MIN LLONG_MIN (C++11) |
的signed char的最低值,short,int,long和long long 原文: minimum value of signed char, short, int, long and long long respectively (常量宏) |
| SCHAR_MAX SHRT_MAX INT_MAX LONG_MAX LLONG_MAX (C++11) |
最大值signed char,short,int,long和long long 原文: maximum value of signed char, short, int, long and long long respectively (常量宏) |
| UCHAR_MAX USHRT_MAX UINT_MAX ULONG_MAX ULLONG_MAX (C++11) |
最大值unsigned char,unsigned short,unsigned int, unsigned long和unsigned long long 原文: maximum value of unsigned char, unsigned short, unsigned int, unsigned long and unsigned long long respectively (常量宏) |
[编辑] 浮点类型的限制
| 在头文件
<cfloat> 中定义 | |
| FLT_RADIX |
的基数(整数基地)所使用的所有三个浮点类型的代表性 原文: the radix (integer base) used by the representation of all three floating-point types (常量宏) |
| DECIMAL_DIG (C++11) |
数量不损失精度的情况下,可以转换为long double和背部的小数位数 原文: number of decimal digits that can be converted to long double and back without losing precision (常量宏) |
| FLT_MIN DBL_MIN LDBL_MIN |
最低值float,doublelong double 原文: minimum value of float, double and long double respectively (常量宏) |
| FLT_MAX DBL_MAX LDBL_MAX |
最大值float,doublelong double 原文: maximum value of float, double and long double respectively (常量宏) |
| FLT_EPSILON DBL_EPSILON LDBL_EPSILON |
1.0和下一个可表示的值float,double和long double之间的差异 原文: difference between 1.0 and the next representable value for float, double and long double respectively (常量宏) |
| FLT_DIG DBL_DIG LDBL_DIG |
数可以表示的十进制数字组成,不会有任何损失float,double和long double 原文: number of decimal digits that can be represented without losing precision for float, double and long double respectively (常量宏) |
| FLT_MANT_DIG DBL_MANT_DIG LDBL_MANT_DIG |
基站 FLT_RADIX数字数,可以表示,而不会失去精度float,double和long double分别 原文: number of base FLT_RADIX digits that can be represented without losing precision for float, double and long double respectively (常量宏) |
| FLT_MIN_EXP DBL_MIN_EXP LDBL_MIN_EXP |
归一化 FLT_RADIX,float和double分别long double提出的功率少了一个比整数的最小负整数 原文: minimum negative integer such that FLT_RADIX raised by power one less than that integer is a normalized float, double and long double respectively (常量宏) |
| FLT_MIN_10_EXP DBL_MIN_10_EXP LDBL_MIN_10_EXP |
归一化10,float和double分别long double提出的功率少了一个比整数的最小负整数 原文: minimum negative integer such that 10 raised by power one less than that integer is a normalized float, double and long double respectively (常量宏) |
| FLT_MAX_EXP DBL_MAX_EXP LDBL_MAX_EXP |
FLT_RADIX提出的功率超过该整数的最大的正整数是归一化float,double和long double分别 原文: maximum positive integer such that FLT_RADIX raised by power one more than that integer is a normalized float, double and long double respectively (常量宏) |
| FLT_MAX_10_EXP DBL_MAX_10_EXP LDBL_MAX_10_EXP |
10提出的功率超过该整数的最大的正整数是归一化float,double和long double分别 原文: maximum positive integer such that 10 raised by power one more than that integer is a normalized float, double and long double respectively (常量宏) |
| 默认的舍入模式的浮点算术 原文: default rounding mode of floating-point arithmetics (常量宏) | |
| (C++11) |
指定在什么样的精度完成所有算术运算 原文: specifies in what precision all arithmetic operations are done (常量宏) |