FreeBSD Manual Pages
std::numeri...mits::lowest(3) C++ Standard Libarystd::numeri...mits::lowest(3) NAME std::numeric_limits::lowest - std::numeric_limits::lowest Synopsis static constexpr T lowest() noexcept; (since C++11) Returns the lowest finite value representable by the numeric type T, that is, a finite value x such that there is no other finite value y where y < x. This is different from std::numeric_limits<T>::min() for floating-point types. Only meaningful for bounded types. Return value T std::numeric_limits<T>::lowest() /* non-specialized */ (C++11) T() bool (C++11) false char (C++11) CHAR_MIN signed char (C++11) SCHAR_MIN unsigned char (C++11) 0 wchar_t (C++11) WCHAR_MIN char8_t (C++20) 0 char16_t (C++11) 0 char32_t (C++11) 0 short (C++11) SHRT_MIN unsigned short (C++11) 0 int (C++11) INT_MIN unsigned int (C++11) 0 long (C++11) LONG_MIN unsigned long (C++11) 0 long long (C++11) LLONG_MIN unsigned long long (C++11) 0 float (C++11) -FLT_MAX double (C++11) -DBL_MAX long double (C++11) -LDBL_MAX Notes For every standard C++ floating-point type T std::numeric_lim- its<T>::lowest() == -std::numeric_limits<T>::max(), but this does not necessarily have to be the case for any third-party specialization. Example Demonstrates min, max, and lowest for floating-point types // Run this code #include <limits> #include <iostream> int main() { std::cout << "std::numeric_limits<T>::min():\n" << "\tfloat: " << std::numeric_limits<float>::min() << " or " << std::hexfloat << std::numeric_lim- its<float>::min() << '\n' << "\tdouble: " << std::defaultfloat << std::nu- meric_limits<double>::min() << " or " << std::hexfloat << std::numeric_limits<dou- ble>::min() << '\n'; std::cout << "std::numeric_limits<T>::lowest():\n" << "\tfloat: " << std::defaultfloat << std::numeric_lim- its<float>::lowest() << " or " << std::hexfloat << std::numeric_lim- its<float>::lowest() << '\n' << "\tdouble: " << std::defaultfloat << std::nu- meric_limits<double>::lowest() << " or " << std::hexfloat << std::numeric_limits<dou- ble>::lowest() << '\n'; std::cout << "std::numeric_limits<T>::max():\n" << "\tfloat: " << std::defaultfloat << std::numeric_lim- its<float>::max() << " or " << std::hexfloat << std::numeric_lim- its<float>::max() << '\n' << "\tdouble: " << std::defaultfloat << std::nu- meric_limits<double>::max() << " or " << std::hexfloat << std::numeric_limits<dou- ble>::max() << '\n'; } Output: std::numeric_limits<T>::min(): float: 1.17549e-38 or 0x1p-126 double: 2.22507e-308 or 0x1p-1022 std::numeric_limits<T>::lowest(): float: -3.40282e+38 or -0x1.fffffep+127 double: -1.79769e+308 or -0x1.fffffffffffffp+1023 std::numeric_limits<T>::max(): float: 3.40282e+38 or 0x1.fffffep+127 double: 1.79769e+308 or 0x1.fffffffffffffp+1023 See also min returns the smallest finite value of the given type [static] (public static member function) denorm_min returns the smallest positive subnormal value of the given floating-point [static] type (public static member function) max returns the largest finite value of the given type [static] (public static member function) http://cppreference.com 2022.07.31 std::numeri...mits::lowest(3)
NAME | Synopsis | Return value | Notes | Example | Output: | See also
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::numeric_limits::lowest&sektion=3&manpath=FreeBSD+Ports+15.0>
