std::numeric_limits<T>::round_error
来自cppreference.com
< cpp | types | numeric limits
| static T round_error() throw(); |
(C++11 前) | |
| static constexpr T round_error() noexcept; |
(C++11 起) | |
返回以 ULP (最后位置单位)表示的最大可能舍入错误,其为 ISO 10967 定义,可以从 0.5 (舍入到最近位)变化到 1.0 (舍入到零或无穷大)。它仅若 std::numeric_limits<T>::is_integer == false 才有意义。
返回值
T
|
std::numeric_limits<T>::round_error() |
| /* non-specialized */ | T()
|
| bool | false |
| char | 0 |
| signed char | 0 |
| unsigned char | 0 |
| wchar_t | 0 |
| char8_t | 0 |
| char16_t | 0 |
| char32_t | 0 |
| short | 0 |
| unsigned short | 0 |
| int | 0 |
| unsigned int | 0 |
| long | 0 |
| unsigned long | 0 |
| long long | 0 |
| unsigned long long | 0 |
| float | 0.5F |
| double | 0.5 |
| long double | 0.5L |
参阅
| [静态] |
鉴别类型所用的舍入模式 (公开静态成员常量) |