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進数値型では 2 ですが、例えばIEEE 754の 10進浮動小数点型 やサードパーティの 2進化10進数 整数では 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) |