std::numeric_limits<T>::round_error
From cppreference.com
static T round_error() throw(); |
(C++11まで) | |
| static constexpr T round_error() noexcept; |
(C++11以降) | |
ISO 10967 で定義されている、ULP (unit in the last place) 単位での最大の丸め誤差を返します。この値は 0.5 (最も近い桁への丸め) から 1.0 (ゼロまたは無限大への丸め) の範囲で変化する可能性があります。この値は、std::numeric_limits<T>::is_integer == false の場合にのみ意味があります。
[編集] 戻り値
T
|
std::numeric_limits<T>::round_error() |
| /* 非特殊化 */ | T() |
| bool | false |
| 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 | 0.5F |
| double | 0.5 |
| long double | 0.5L |
[編集] 関連項目
| [static] |
型で使用される丸めスタイルを識別する (public static member constant) |