Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::numeric_limits<T>::round_error

      From cppreference.com
      <cpp‎ |types‎ |numeric limits
       
       
      Utilities library
       
       
      std::numeric_limits
      Static constants
      Static member functions
      numeric_limits::round_error
      Helper types
       
      static T round_error()throw();
      (until C++11)
      staticconstexpr T round_error()noexcept;
      (since C++11)

      Returns the largest possible rounding error in ULPs (units in the last place) as defined by ISO 10967, which can vary from0.5 (rounding to the nearest digit) to1.0 (rounding to zero or to infinity). It is only meaningful ifstd::numeric_limits<T>::is_integer==false.

      [edit]Return value

      Tstd::numeric_limits<T>::round_error()
      /* non-specialized */T()
      boolfalse
      char0
      signedchar0
      unsignedchar0
      wchar_t0
      char8_t(since C++20)0
      char16_t(since C++11)0
      char32_t(since C++11)0
      short0
      unsignedshort0
      int0
      unsignedint0
      long0
      unsignedlong0
      longlong(since C++11)0
      unsignedlonglong(since C++11)0
      float0.5F
      double0.5
      longdouble0.5L

      [edit]See also

      [static]
      identifies the rounding style used by the type
      (public static member constant)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/types/numeric_limits/round_error&oldid=148438"

      [8]ページ先頭

      ©2009-2025 Movatter.jp