⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 limits2.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HTML><HEAD><TITLE>&lt;limits&gt;</TITLE></HEAD><BODY><H1><A NAME="&lt;limits&gt;"><CODE>&lt;limits&gt;</CODE></A></H1><HR><P>Include the standard header <B><CODE>&lt;limits&gt;</CODE></B>to define the template class <CODE>numeric_limits</CODE>.Explicit specializations of this class describe many arithmetic propertiesof the scalar types (other than pointers).</P><PRE>namespace std {enum <B><A HREF="#float_denorm_style">float_denorm_style</A></B>;enum <B><A HREF="#float_round_style">float_round_style</A></B>;template&lt;class Ty&gt;    class <B><A HREF="#numeric_limits">numeric_limits</A></B>;    };</PRE><H2><A NAME="float_denorm_style"><CODE>float_denorm_style</CODE></A></H2><PRE>enum float_denorm_style {    <B>denorm_indeterminate</B> = -1,    <B>denorm_absent</B> = 0,    <B>denorm_present</B> = 1    };</PRE><P>The enumeration describes the various methods that an implementationcan choose for representing a denormalized floating-point value --one too small to represent as a normalized value:</P><UL><LI><B><A NAME="float_denorm_style::denorm_indeterminate"><CODE>denorm_indeterminate</CODE></A></B>-- presence or absence of denormalized forms cannot be determinedat translation time<LI><B><A NAME="float_denorm_style::denorm_absent"><CODE>denorm_absent</CODE></A></B>-- denormalized forms are absent<LI><B><A NAME="float_denorm_style::denorm_present"><CODE>denorm_present</CODE></A></B> -- denormalized forms are present</UL><H2><A NAME="float_round_style"><CODE>float_round_style</CODE></A></H2><PRE>enum float_round_style {    <B>round_indeterminate</B> = -1,    <B>round_toward_zero</B> = 0,    <B>round_to_nearest</B> = 1,    <B>round_toward_infinity</B> = 2,    <B>round_toward_neg_infinity</B> = 3    };</PRE><P>The enumeration describes the various methods that an implementationcan choose for rounding a floating-point value to an integer value:</P><UL><LI><B><A NAME="float_round_style::round_indeterminate"><CODE>round_indeterminate</CODE></A></B>-- rounding method cannot be determined<LI><B><A NAME="float_round_style::round_toward_zero"><CODE>round_toward_zero</CODE></A></B>-- round toward zero<LI><B><A NAME="float_round_style::round_to_nearest"><CODE>round_to_nearest</CODE></A></B> -- round to nearest integer<LI><B><A NAME="float_round_style::round_toward_infinity"><CODE>round_toward_infinity</CODE></A></B> -- round away from zero<LI><B><A NAME="float_round_style::round_toward_neg_infinity"><CODE>round_toward_neg_infinity</CODE></A></B>-- round to more negative integer</UL><H2><A NAME="numeric_limits"><CODE>numeric_limits</CODE></A></H2><PRE>template&lt;class Ty&gt;    class numeric_limits {public:    static const float_denorm_style <B><A HREF="#numeric_limits::has_denorm">has_denorm</A></B>        = denorm_absent;    static const bool <B><A HREF="#numeric_limits::has_denorm_loss">has_denorm_loss</A></B> = false;    static const bool <B><A HREF="#numeric_limits::has_infinity">has_infinity</A></B> = false;    static const bool <B><A HREF="#numeric_limits::has_quiet_NaN">has_quiet_NaN</A></B> = false;    static const bool <B><A HREF="#numeric_limits::has_signaling_NaN">has_signaling_NaN</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_bounded">is_bounded</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_exact">is_exact</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_iec559">is_iec559</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_integer">is_integer</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_modulo">is_modulo</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_signed">is_signed</A></B> = false;    static const bool <B><A HREF="#numeric_limits::is_specialized">is_specialized</A></B> = false;    static const bool <B><A HREF="#numeric_limits::tinyness_before">tinyness_before</A></B> = false;    static const bool <B><A HREF="#numeric_limits::traps">traps</A></B> = false;    static const float_round_style <B><A HREF="#numeric_limits::round_style">round_style</A></B> =        round_toward_zero;    static const int <B><A HREF="#numeric_limits::digits">digits</A></B> = 0;    static const int <B><A HREF="#numeric_limits::digits10">digits10</A></B> = 0;    static const int <B><A HREF="#numeric_limits::max_exponent">max_exponent</A></B> = 0;    static const int <B><A HREF="#numeric_limits::max_exponent10">max_exponent10</A></B> = 0;    static const int <B><A HREF="#numeric_limits::min_exponent">min_exponent</A></B> = 0;    static const int <B><A HREF="#numeric_limits::min_exponent10">min_exponent10</A></B> = 0;    static const int <B><A HREF="#numeric_limits::radix">radix</A></B> = 0;    static Ty <B><A HREF="#numeric_limits::denorm_min">denorm_min</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::epsilon">epsilon</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::infinity">infinity</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::max">max</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::min">min</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::quiet_NaN">quiet_NaN</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::round_error">round_error</A></B>() throw();    static Ty <B><A HREF="#numeric_limits::signaling_NaN">signaling_NaN</A></B>() throw();    };</PRE><P>The template class describes many arithmetic properties of itsparameter type <CODE>Ty</CODE>. The header defines explicit specializationsfor the types <CODE>wchar_t</CODE>, <I>bool, char, signed char,unsigned char, short, unsigned short, int, unsigned int, long,unsigned long, float, double,</I> and <I>long double.</I> For all theseexplicit specializations, the member <CODE>is_specialized</CODE> is true,and all relevant members have meaningful values.The program can supply additional explicit specializations.</P><P>For an arbitrary specialization, <I>no</I> members have meaningfulvalues. A member object that does not have a meaningful valuestores zero (or false) and a member function that does not returna meaningful value returns <CODE>Ty(0)</CODE>.</P><H3><A NAME="numeric_limits::denorm_min"><CODE>numeric_limits::denorm_min</CODE></A></H3><PRE>static Ty <B>denorm_min</B>() throw();</PRE><P>The function returns the minimum value for the type(which is the same as<A HREF="#numeric_limits::min"><CODE>min</CODE></A>() if<A HREF="#numeric_limits::has_denorm"><CODE>has_denorm</CODE></A> isnot equal to<CODE><A HREF="#float_denorm_style::denorm_present">denorm_present</A></CODE>).</P><H3><A NAME="numeric_limits::digits"><CODE>numeric_limits::digits</CODE></A></H3><PRE>static const int <B>digits</B> = 0;</PRE><P>The member stores the number of<A HREF="#numeric_limits::radix"><CODE>radix</CODE></A> digitsthat the type can represent without change(which is the number of bits other than any sign bitfor a predefined integer type, or the number of mantissadigits for a predefined floating-point type).</P><H3><A NAME="numeric_limits::digits10"><CODE>numeric_limits::digits10</CODE></A></H3><PRE>static const int <B>digits10</B> = 0;</PRE><P>The member stores the number of decimal digitsthat the type can represent without change.</P><H3><A NAME="numeric_limits::epsilon"><CODE>numeric_limits::epsilon</CODE></A></H3><PRE>static Ty <B>epsilon</B>() throw();</PRE><P>The function returns the difference between 1 and the smallestvalue greater than 1 that is representable for the type(which is the value<A HREF="float.html#FLT_EPSILON"><CODE>FLT_EPSILON</CODE></A>for type <I>float</I>).<H3><A NAME="numeric_limits::has_denorm"><CODE>numeric_limits::has_denorm</CODE></A></H3><PRE>static const float_denorm_style <B>has_denorm</B> =    denorm_absent;</PRE><P>The member stores<CODE><A HREF="#float_denorm_style::denorm_present">denorm_present</A></CODE>for a floating-point type that hasdenormalized values (effectively a variable number of exponent bits).</P><H3><A NAME="numeric_limits::has_denorm_loss"><CODE>numeric_limits::has_denorm_loss</CODE></A></H3><PRE>static const bool <B>has_denorm_loss</B> = false;</PRE><P>The member stores true for a type that determineswhether a value has lost accuracy because it is deliveredas a denormalized result (too small to represent asa normalized value) or because it is inexact (not thesame as a result not subject to limitations of exponentrange and precision), an option with<A HREF="#IEC 559">IEC 559</A> floating-point representationsthat can affect some results.</P><H3><A NAME="numeric_limits::has_infinity"><CODE>numeric_limits::has_infinity</CODE></A></H3><PRE>static const bool <B>has_infinity</B> = false;</PRE><P>The member stores true for a type that hasa representation for positive infinity.True if <A HREF="#numeric_limits::is_iec559"><CODE>is_iec559</CODE></A> is true.</P><H3><A NAME="numeric_limits::has_quiet_NaN"><CODE>numeric_limits::has_quiet_NaN</CODE></A></H3><PRE>static const bool <B>has_quiet_NaN</B> = false;</PRE><P>The member stores true for a type that hasa representation for a <B><A NAME="quiet NaN">quiet NaN</A></B>,an encoding that is ``Not a Number'' which does not<A HREF="signal.html#signals">signal</A> its presence in an expression.True if <A HREF="#numeric_limits::is_iec559"><CODE>is_iec559</CODE></A> is true.</P><H3><A NAME="numeric_limits::has_signaling_NaN"><CODE>numeric_limits::has_signaling_NaN</CODE></A></H3><PRE>static const bool <B>has_signaling_NaN</B> = false;</PRE><P>The member stores true for a type that hasa representation for a <B><A NAME="signaling NaN">signaling NaN</A></B>,an encoding that is ``Not a Number'' which<A HREF="signal.html#signals">signals</A> its presence in an expressionby reporting an exception.True if <A HREF="#numeric_limits::is_iec559"><CODE>is_iec559</CODE></A> is true.</P><H3><A NAME="numeric_limits::infinity"><CODE>numeric_limits::infinity</CODE></A></H3><PRE>static Ty <B>infinity</B>() throw();</PRE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -