Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide

numeric_limits

Library:  Language support


Does not inherit

Local Index

Members

Summary

A class template for representing information about arithmetic types.

Synopsis

#include <limits>

namespace std {
  template <class T>
  class numeric_limits;
}

Specializations

Description

Members of class template numeric_limits provide information about the properties of the implementation's fundamental arithmetic types. Specializations of the template are included for each arithmetic type. The program may specialize the primary template on user-defined types.

This class encapsulates information that is contained in the <climits> and <cfloat> headers, and includes additional information that is not contained in any existing C or C++ header.

Not all of the information given by members is meaningful for all specializations of numeric_limits. Any value that is not meaningful for a particular type is set to 0 or false.

Interface

Member Fields and Functions

static T 
denorm_min() throw();
static const int 
digits;
static const int 
digits10;
static T 
epsilon() throw();
static const float_denorm_style 
has_denorm;
static const bool
has_denorm_loss; 
static const bool 
has_infinity;
static const bool 
has_quiet_NaN;
static const bool 
has_signaling_NaN;
static T 
infinity() throw();
static const bool 
is_bounded;
static const bool 
is_exact;
static const bool 
is_iec559;
static const bool 
is_integer;
static const bool 
is_modulo;
static const bool 
is_signed;
static const bool 
is_specialized;
static T
max() throw();
static const int 
max_exponent;
static const int 
max_exponent10;
static T 
min() throw(;
static const int 
min_exponent;
static const int 
min_exponent10;
static T 
quiet_NaN() throw();
static const int 
radix;
static T 
round_error() throw();
static const float_round_style 
round_style;
static T 
signaling_NaN() throw();
static const bool 
tinyness_before;
static const bool 
traps;

Warnings

The specializations for wide chars and bool are only available if your compiler has implemented them as real types and not simulated them with typedefs.

See Also

IEEE Standard for Binary Floating-Point Arithmetic, 345 East 47th Street, New York, NY 10017

Language Independent Arithmetic (LIA-1)

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 18.2.1



Previous fileTop of DocumentContentsIndex pageNext file