Namespaces
Variants
Views
Actions

std::numeric_limits::radix

From cppreference.com
< cpp‎ | types‎ | numeric limits
Revision as of 15:32, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
Type traits
Primary type categories
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Type properties
(C++11)
(C++11)
(C++11)
(C++14)
Supported operations
Relationships and property queries
(C++11)
(C++11)
(C++11)
(C++11)
Type modifications
(C++11)(C++11)(C++11)
Type transformations
(C++11)
(C++11)
(C++11)
Type trait constants
 
 

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
static const int radix
</td>

<td class="t-dcl-nopad"> </td> <td > (until C++11) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
static constexpr int radix
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

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.

Standard specializations

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

See also

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