Namespaces
Variants
Actions

std::numeric_limits<T>::radix

From cppreference.com
 
 
 
 
 
static const int radix;
(until C++11)
static constexpr int radix;
(since C++11)

The value of std::numeric_limits<T>::radix is the base of the number system used in the representation of the type. It is 2 for all binary numeric types, but it may be, for example, 10 for IEEE 754 decimal floating-point types or for third-party binary-coded decimal integers. This constant is meaningful for all specializations.

[edit] Standard specializations

Tvalue of std::numeric_limits<T>::radix
/* non-specialized */0
bool2
char2
signed char2
unsigned char2
wchar_t2
char8_t (since C++20)2
char16_t (since C++11)2
char32_t (since C++11)2
short2
unsigned short2
int2
unsigned int2
long2
unsigned long2
long long (since C++11)2
unsigned long long (since C++11)2
floatFLT_RADIX
doubleFLT_RADIX
long doubleFLT_RADIX

[edit] See also

[static]
number of radix digits that can be represented without change
(public static member constant) [edit]
[static]
one more than the smallest negative power of the radix that is a valid normalized floating-point value
(public static member constant) [edit]
[static]
one more than the largest integer power of the radix that is a valid finite floating-point value
(public static member constant) [edit]