numeric_limits::digits
종류를 나타낼 수 있습니다. 정밀도 손실 없이 기 수 숫자를 반환 합니다.
static const int digits = 0;
반환 값
자릿수 정밀도의 손실 없이 형식을 나타내는 기 수.
설명
멤버 형식을 나타내는 비트는 부호 비트에 대 한 미리 정의 된 정수 형식 이외의 것을 변경 하지 않고 기 수 자릿수 또는 미리 정의 된 부동 소수점 형식에 대 한가 수 자릿수를 저장 합니다.
예제
// numeric_limits_digits_min.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << numeric_limits<float>::digits <<endl;
cout << numeric_limits<double>::digits <<endl;
cout << numeric_limits<long double>::digits <<endl;
cout << numeric_limits<int>::digits <<endl;
cout << numeric_limits<__int64>::digits <<endl;
}
요구 사항
헤더: <limits>
네임 스페이스: std