std::numeric_limits<T>:: min_exponent
|
static
const
int
min_exponent
;
|
(C++11まで) | |
|
static
constexpr
int
min_exponent
;
|
(C++11以降) | |
std::
numeric_limits
<
T
>
::
min_exponent
の値は、浮動小数点型
T
の正規化された有効な値となる、最も低い負の数
n
であり、ここで
r
は
std::
numeric_limits
<
T
>
::
radix
です。
標準特殊化
T
|
std:: numeric_limits < T > :: min_exponent の値 |
| /* non-specialized */ | 0 |
| bool | 0 |
| char | 0 |
| signed char | 0 |
| unsigned char | 0 |
| wchar_t | 0 |
| char8_t (C++20以降) | 0 |
| char16_t (C++11以降) | 0 |
| char32_t (C++11以降) | 0 |
| short | 0 |
| unsigned short | 0 |
| int | 0 |
| unsigned int | 0 |
| long | 0 |
| unsigned long | 0 |
| long long (C++11以降) | 0 |
| unsigned long long (C++11以降) | 0 |
| float | FLT_MIN_EXP |
| double | DBL_MIN_EXP |
| long double | LDBL_MIN_EXP |
例
min_exponent
、
min_exponent10
、
min()
、および
radix
の関係を
float
型について示します:
#include <iostream> #include <limits> int main() { std::cout << "min() = " << std::numeric_limits<float>::min() << '\n' << "min_exponent10 = " << std::numeric_limits<float>::min_exponent10 << '\n' << std::hexfloat << '\n' << "min() = " << std::numeric_limits<float>::min() << '\n' << "min_exponent = " << std::numeric_limits<float>::min_exponent << '\n'; }
出力:
min() = 1.17549e-38 min_exponent10 = -37 min() = 0x1p-126 min_exponent = -125
関連項目
|
[static]
|
指定された型の表現で使用される基数または整数の底
(public static member constant) |
|
[static]
|
正規化された浮動小数点値として有効な10の最小の負のべき乗
(public static member constant) |
|
[static]
|
有効な有限浮動小数点値となる基数の最大の整数べき乗より1大きい値
(public static member constant) |
|
[static]
|
有効な有限浮動小数点値となる10の最大の整数べき乗
(public static member constant) |