std::numeric_limits::radix(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… std::numeric_limits::radix πŸ’…

okay so this is the std::numeric_limits::radix(3) page from the C++ Standard Libary manual, and we are absolutely getting into it. 🫢

🌸 NAME 🌸

std::numeric_limits::radix β€” literally std::numeric_limits::radix, no notes πŸ’…

πŸ¦‹ Synopsis πŸ¦‹

the synopsis tea is:

static const int radix;      (until C++11)
static constexpr int radix;  (since C++11)

the value of std::numeric_limits<T>::radix is the base of the number system used in the representation of the type. it is 2 for all binary numeric types, but it may be, for example, 10 for IEEE 754 decimal floating-point types or for third-party binary-coded decimal integers. this constant is meaningful for all specializations. periodt. ✨

πŸŽ€ Standard specializations πŸŽ€

here’s the T β†’ value of std::numeric_limits<T>::radix mapping, every single row, no skips:

  • /* non-specialized */ β€” 0
  • bool β€” 2
  • char β€” 2
  • signed char β€” 2
  • unsigned char β€” 2
  • wchar_t β€” 2
  • char8_t (since C++20) β€” 2
  • char16_t (since C++11) β€” 2
  • char32_t (since C++11) β€” 2
  • short β€” 2
  • unsigned short β€” 2
  • int β€” 2
  • unsigned int β€” 2
  • long β€” 2
  • unsigned long β€” 2
  • long long (since C++11) β€” 2
  • unsigned long long (since C++11) β€” 2
  • float β€” FLT_RADIX
  • double β€” FLT_RADIX
  • long double β€” FLT_RADIX

πŸ”Ž See also πŸ”Ž

  • digits β€” number of radix digits that can be represented without change. [static] (public static member constant)
  • min_exponent β€” one more than the smallest negative power of the radix that is a valid normalized floating-point value. [static] (public static member constant)
  • max_exponent β€” one more than the largest integer power of the radix that is a valid finite floating-point value. [static] (public static member constant)

source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::numeric_limits::radix(3) β€” bye bestie, go be iconic with your radix knowledge πŸ’–πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from