首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::numeric_limits::radix

static const int radix;

(until C++11)

static constexpr int radix;

(since C++11)

价值std::numeric_limits<T>::radix用于表示类型的数字系统的基础。对于所有二进制数字类型,它是2,但例如,对于ieee 754,它可能是10。十进制浮点类型或者为第三方二进制编码十进制整数。这个常量对于所有的专门化都是有意义的。

标准专业化

T

value of std::numeric_limits<T>::radix

/* non-specialized */

​0​

bool

2

char

2

signed char

2

unsigned char

2

wchar_t

2

char16_t

2

char32_t

2

short

2

unsigned short

2

int

2

unsigned int

2

long

2

unsigned long

2

long long

2

unsigned long long

2

float

FLT_RADIX

double

FLT_RADIX

long double

FLT_RADIX

另见

digits static

number of radix digits that can be represented without change (public static member constant)

min_exponent static

one more than the smallest negative power of the radix that is a valid normalized floating-point value (public static member constant)

max_exponent static

one more than the largest integer power of the radix that is a valid finite floating-point value (public static member constant)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券