Namespaces
Variants

std::numeric_limits<T>::min_exponent

cppreference.net에서
 
 
유틸리티 라이브러리
일반 유틸리티
관계 연산자 (C++20에서 폐지됨)
정수 비교 함수
(C++20)(C++20)(C++20)    
(C++20)
스왑 및 타입 연산
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
일반 어휘 타입
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)



 
 
 
static const int min_exponent;
(C++11까지)
static constexpr int min_exponent;
(C++11부터)

std::numeric_limits<T>::min_exponent의 값은 가장 작은 음수 n이며, rn-1
, 여기서 r은 std::numeric_limits<T>::radix이고, 부동소수점 타입 T의 유효한 정규화된 값이 됩니다.

표준 특수화

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)