std::numeri...round_error(3)
π NAME π
std::numeric_limits::round_error β std::numeric_limits::round_error. Yes, bestie, it's literally the same name twice, and this is the page for it in the C++ Standard Libary manual. It's giving extremely specific numeric-limits main-character energy, and we are covering every single crumb. π«Άβ¨
β¨ Synopsis β¨
okay so the signatures are right here, exactly as written:
static T round_error() throw(); (until C++11)
static constexpr T round_error() noexcept; (since C++11)
It returns the largest possible rounding error in ULPs (units in the last place) as defined by ISO 10967, which can vary from 0.5 (rounding to the nearest digit) to 1.0 (rounding to zero or to infinity). It is only meaningful if std::numeric_limits<T>::is_integer == false. π
π Return value π
The return value type is T. And std::numeric_limits<T>::round_error() hits like this:
/* non-specialized */βT()boolβfalsecharβ0signed charβ0unsigned charβ0wchar_tβ0char8_t(since C++20) β0char16_t(since C++11) β0char32_t(since C++11) β0shortβ0unsigned shortβ0intβ0unsigned intβ0longβ0unsigned longβ0long long(since C++11) β0unsigned long long(since C++11) β0floatβ0.5Fdoubleβ0.5long doubleβ0.5L
π¦ See also π¦
round_styleidentifies the rounding style used by the type β[static](public static member constant) β
That's the whole page, bestie! Cute little source/version sign-off: http://cppreference.com, date stamp 2024.06.10. Periodt. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms