Namespaces
Variants

std::numeric_limits<T>:: min_exponent

From cppreference.net
Utilities library
static const int min_exponent ;
(C++11 이전)
static constexpr int min_exponent ;
(C++11 이후)

std:: numeric_limits < T > :: min_exponent 의 값은 부동 소수점 타입 T 의 유효한 정규화된 값이 되는 r r n-1
에서 n 이 취할 수 있는 가장 낮은 음수입니다. 여기서 r std:: numeric_limits < T > :: radix 입니다.

표준 특수화

T std:: numeric_limits < T > :: min_exponent 의 값
/* non-specialized */ 0
bool 0
char 0
signed char 0
unsigned char 0
wchar_t 0
char8_t (C++20부터) 0
char16_t (C++11부터) 0
char32_t (C++11부터) 0
short 0
unsigned short 0
int 0
unsigned int 0
long 0
unsigned long 0
long long (C++11부터) 0
unsigned long long (C++11부터) 0
float FLT_MIN_EXP
double DBL_MIN_EXP
long double LDBL_MIN_EXP

예제

min_exponent , min_exponent10 , min() , 그리고 radix 사이의 관계를 float 타입에 대해 보여줍니다:

#include <iostream>
#include <limits>
int main()
{
    std::cout << "min() = " << std::numeric_limits<float>::min() << '\n'
              << "min_exponent10 = " << std::numeric_limits<float>::min_exponent10 << '\n'
              << std::hexfloat << '\n'
              << "min() = " << std::numeric_limits<float>::min() << '\n'
              << "min_exponent = " << std::numeric_limits<float>::min_exponent << '\n';
}

출력:

min() = 1.17549e-38
min_exponent10 = -37
min() = 0x1p-126
min_exponent = -125

참고 항목

[static]
주어진 타입의 표현에 사용되는 기수 또는 정수 베이스
(public static member constant)
유효한 정규화된 부동소수점 값인 가장 작은 10의 음의 거듭제곱
(public static member constant)
유효한 유한 부동소수점 값인 기수의 가장 큰 정수 거듭제곱보다 1 큰 값
(public static member constant)
유효한 유한 부동소수점 값인 가장 큰 10의 정수 거듭제곱
(public static member constant)