std::numeric_limits<T>:: radix
From cppreference.net
<
cpp
|
types
|
numeric limits
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type support
| Basic types | |||||||||||||||||||||
| Fixed width integer types (C++11) | |||||||||||||||||||||
| Fixed width floating-point types (C++23) | |||||||||||||||||||||
|
|||||||||||||||||||||
| Numeric limits | |||||||||||||||||||||
| C numeric limits interface | |||||||||||||||||||||
| Runtime type information | |||||||||||||||||||||
|
|||||||||||||||||||||
std::numeric_limits
| Static constants | ||||
|
(C++11)
|
||||
|
numeric_limits::radix
|
||||
| Static member functions | ||||
|
(C++11)
|
||||
| Helper types | ||||
|
static
const
int
radix
;
|
(C++11 이전) | |
|
static
constexpr
int
radix
;
|
(C++11 이후) | |
std:: numeric_limits < T > :: radix 의 값은 해당 타입의 표현에 사용된 숫자 체계의 기수입니다. 모든 이진 수치 타입에 대해서는 2 이지만, 예를 들어 IEEE 754 십진 부동소수점 타입 이나 서드파티 BCD(Binary-Coded Decimal) 정수 의 경우 10 일 수 있습니다. 이 상수는 모든 특수화에 대해 의미를 가집니다.
표준 특수화
T
|
std:: numeric_limits < T > :: radix 의 값 |
| /* non-specialized */ | 0 |
| bool | 2 |
| char | 2 |
| signed char | 2 |
| unsigned char | 2 |
| wchar_t | 2 |
| char8_t (C++20부터) | 2 |
| char16_t (C++11부터) | 2 |
| char32_t (C++11부터) | 2 |
| short | 2 |
| unsigned short | 2 |
| int | 2 |
| unsigned int | 2 |
| long | 2 |
| unsigned long | 2 |
| long long (C++11부터) | 2 |
| unsigned long long (C++11부터) | 2 |
| float | FLT_RADIX |
| double | FLT_RADIX |
| long double | FLT_RADIX |
참고 항목
|
[static]
|
변경 없이 표현 가능한
radix
자릿수
(public static member constant) |
|
[static]
|
유효한 정규화된 부동소수점 값인 기수의 가장 작은 음의 거듭제곱보다 1 큰 값
(public static member constant) |
|
[static]
|
유효한 유한 부동소수점 값인 기수의 가장 큰 정수 거듭제곱보다 1 큰 값
(public static member constant) |