Aracılığıyla paylaş


numeric_limits::is_exact

Sınama türü üzerinde yapılan hesaplamalar, yuvarlama hatalarının ücretsizdir.

static const bool is_exact = false;

Dönüş Değeri

gerçek hesaplamaları yuvarlama hatalarının; boş olması durumunda yanlış değilse.

Notlar

Tüm önceden tanımlanan tamsayı türlerini tam gösterimler için değerlerine sahip ve dönmek yanlış.Rational veya sabit noktalı gösterimi de tam olarak kabul edilir, ancak kayan noktalı gösterimi değil.

Örnek

// numeric_limits_is_exact.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>

using namespace std;

int main( )
{
   cout << "Whether float objects have calculations "
        << "free of rounding errors: "
        << numeric_limits<float>::is_exact
        << endl;
   cout << "Whether double objects have calculations "
        << "free of rounding errors: "
        << numeric_limits<double>::is_exact
        << endl;
   cout << "Whether long int objects have calculations "
        << "free of rounding errors: "
        << numeric_limits<long int>::is_exact
        << endl;
   cout << "Whether unsigned char objects have calculations "
        << "free of rounding errors: "
        << numeric_limits<unsigned char>::is_exact
        << endl;
}
  

Gereksinimler

Başlık: <limits>

Namespace: std

Ayrıca bkz.

Başvuru

strstreambuf Class