std::numeric_limits<T>::round_error
來自 cppreference.com
static T round_error() throw(); |
(C++11 前) | |
| static constexpr T round_error() noexcept; |
(C++11 起) | |
返回 ISO 10967 定義的 ULP(末位單位)中可能的最大舍入誤差,它可以從 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 |
[編輯] 另請參閱
| [靜態] |
確定該型別所用的舍入樣式 (public static member constant) |