numeric_limits::round_error
반올림 오류 유형에 대 한 최대값을 반환 합니다.
static Type round_error( ) throw( );
반환 값
반올림 오류 유형에 대 한 최대입니다.
예제
// numeric_limits_round_error.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "The maximum rounding error for type float is: "
<< numeric_limits<float>::round_error( )
<< endl;
cout << "The maximum rounding error for type int is: "
<< numeric_limits<int>::round_error( )
<< endl;
cout << "The maximum rounding error for type long double is: "
<< numeric_limits<long double>::round_error( )
<< endl;
}
요구 사항
헤더: <limits>
네임 스페이스: std