std::numeric_limits<T>:: round_error
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)
|
||||
| Static member functions | ||||
|
(C++11)
|
||||
|
numeric_limits::round_error
|
||||
| Helper types | ||||
|
static
T round_error
(
)
throw
(
)
;
|
(C++11まで) | |
|
static
constexpr
T round_error
(
)
noexcept
;
|
(C++11以降) | |
ISO 10967で定義されているULPs(最終桁の単位)における最大丸め誤差を返します。この値は 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) |