Spec-Zone.ru › C++

std::numeric_limits<T>::round_error

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
signedchar 0
unsignedchar 0
wchar_t 0
char8_t (начиная с C++20) 0
char16_t (начиная с C++11) 0
char32_t (начиная с C++11) 0
short 0
unsignedshort 0
int 0
unsignedint 0
long 0
unsignedlong 0
longlong (начиная с C++11) 0
unsignedlonglong (начиная с C++11) 0
float 0.5F
double 0.5
longdouble 0.5L

См. также

round_style
[static]
указывает способ округления, используемый типом
(общедоступная статическая константа-член)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/types/numeric_limits/round_error

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API