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

📄 _limits.c

📁 stl的源码
💻 C
📖 第 1 页 / 共 2 页
字号:
//    return get_word_higher();//#    else /* _STLP_LITTLE_ENDIAN */    return get_word_lower();//#    endif  }};#  endif/* Former values kept in case moving to boost code has introduce a regression on * some platform. */#if 0#  if defined (_STLP_BIG_ENDIAN)#    if defined (__OS400__)#      define _STLP_FLOAT_INF_REP { 0x7f80, 0 }#      define _STLP_FLOAT_QNAN_REP { 0xffc0, 0 }#      define _STLP_FLOAT_SNAN_REP { 0xff80, 0 }#      define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 }#      define _STLP_DOUBLE_QNAN_REP { 0xfff8, 0, 0, 0 }#      define _STLP_DOUBLE_SNAN_REP { 0xfff0, 0, 0, 0 }#      define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }#      define _STLP_LDOUBLE_QNAN_REP { 0xfff8, 0, 0, 0, 0, 0, 0, 0 }#      define _STLP_LDOUBLE_SNAN_REP { 0xfff0, 0, 0, 0, 0, 0, 0, 0 }#    else /* __OS400__ */#      define _STLP_FLOAT_INF_REP   { 0x7f80, 0 }#      define _STLP_FLOAT_QNAN_REP  { 0x7fc1, 0 }#      define _STLP_FLOAT_SNAN_REP  { 0x7f81, 0 }#      define _STLP_DOUBLE_INF_REP  { 0x7ff0, 0, 0, 0 }#      define _STLP_DOUBLE_QNAN_REP { 0x7ff9, 0, 0, 0 }#      define _STLP_DOUBLE_SNAN_REP { 0x7ff1, 0, 0, 0 }#      define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }#      define _STLP_LDOUBLE_QNAN_REP { 0x7ff1, 0, 0, 0, 0, 0, 0, 0 }#      define _STLP_LDOUBLE_SNAN_REP { 0x7ff9, 0, 0, 0, 0, 0, 0, 0 }#    endif /* __OS400__ */#  else /* _STLP_LITTLE_ENDIAN */#    if defined(__DECCXX)#      define _STLP_FLOAT_INF_REP { 0, 0x7f80 }#      define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 }#      define _STLP_FLOAT_SNAN_REP { 0x5555, 0x7f85 }#      define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }#      define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 }#      define _STLP_DOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x7ff5 }#      define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0, 0, 0, 0, 0x7fff }#      define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0, 0, 0, 0x8000, 0xffff }#      define _STLP_LDOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x7fff}#    else#      define _STLP_FLOAT_INF_REP { 0, 0x7f80 }#      define _STLP_FLOAT_QNAN_REP { 0, 0x7fc0 }#      define _STLP_FLOAT_SNAN_REP { 0, 0x7fa0 }#      define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }#      define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0x7ff8 }#      define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0x7ff4 }#      if defined (_STLP_MSVC) || defined (__ICL)#        define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 }#        define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 }#        define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF8, 0 }#      elif defined (__BORLANDC__)#        define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff }#        define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xc000, 0x7fff }#        define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xa000, 0x7fff }#      else#        define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff, 0 }#        define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xa000, 0x7fff, 0 }#        define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xc000, 0x7fff, 0 }#      endif#    endif#  endifunion _F_rep {  unsigned short rep[2];  float val;};union _D_rep {  unsigned short rep[4];  double val;};#  ifndef _STLP_NO_LONG_DOUBLEunion _LD_rep {  unsigned short rep[8];  long double val;};#  endif#endiftemplate <class __dummy>float _STLP_CALL _LimG<__dummy>::get_F_inf() {  typedef float_helper<float, 0x7f80u> _FloatHelper;  return _FloatHelper::get_from_last_word();}template <class __dummy>float _STLP_CALL _LimG<__dummy>::get_F_qNaN() {  typedef float_helper<float, 0x7f81u> _FloatHelper;  return _FloatHelper::get_from_last_word();}template <class __dummy>float _STLP_CALL _LimG<__dummy>::get_F_sNaN() {  typedef float_helper<float, 0x7fc1u> _FloatHelper;  return _FloatHelper::get_from_last_word();}template <class __dummy>float _STLP_CALL _LimG<__dummy>::get_F_denormMin() {  typedef float_helper<float, 0x0001u> _FloatHelper;  return _FloatHelper::get_from_first_word();}template <int __use_double_limits>class _NumericLimitsAccess;_STLP_TEMPLATE_NULLclass _NumericLimitsAccess<1> {public:  static double get_inf() {    typedef float_helper<double, 0x7ff0u> _FloatHelper;    return _FloatHelper::get_from_last_word();  }  static double get_qNaN() {    typedef float_helper<double, 0x7ff1u> _FloatHelper;    return _FloatHelper::get_from_last_word();  }  static double get_sNaN() {    typedef float_helper<double, 0x7ff9u> _FloatHelper;    return _FloatHelper::get_from_last_word();  }};template <class __dummy>double _STLP_CALL _LimG<__dummy>::get_D_inf(){ return _NumericLimitsAccess<1>::get_inf(); }template <class __dummy>double _STLP_CALL _LimG<__dummy>::get_D_qNaN(){ return _NumericLimitsAccess<1>::get_qNaN(); }template <class __dummy>double _STLP_CALL _LimG<__dummy>::get_D_sNaN(){ return _NumericLimitsAccess<1>::get_sNaN(); }template <class __dummy>double _STLP_CALL _LimG<__dummy>::get_D_denormMin() {  typedef float_helper<double, 0x0001u> _FloatHelper;  return _FloatHelper::get_from_first_word();}#  if !defined (_STLP_NO_LONG_DOUBLE)_STLP_TEMPLATE_NULLclass _NumericLimitsAccess<0> {public:  static long double get_inf() {#    if defined (_STLP_BIG_ENDIAN)    typedef float_helper<long double, 0x7ff0u> _FloatHelper;#    else    typedef float_helper2<long double, 0x8000u, 0x7fffu> _FloatHelper;#    endif    return _FloatHelper::get_from_last_word();  }  static long double get_qNaN() {#    if defined (_STLP_BIG_ENDIAN)    typedef float_helper<long double, 0x7ff1u> _FloatHelper;#    else    typedef float_helper2<long double, 0xc000u, 0x7fffu> _FloatHelper;#    endif    return _FloatHelper::get_from_last_word();  }  static long double get_sNaN() {#    if defined (_STLP_BIG_ENDIAN)    typedef float_helper<long double, 0x7ff9u> _FloatHelper;#    else    typedef float_helper2<long double, 0x9000u, 0x7fffu> _FloatHelper;#    endif    return _FloatHelper::get_from_last_word();  }};template <class __dummy>long double _STLP_CALL _LimG<__dummy>::get_LD_inf() {  const int __use_double_limits = sizeof(double) == sizeof(long double) ? 1 : 0;  return _NumericLimitsAccess<__use_double_limits>::get_inf();}template <class __dummy>long double _STLP_CALL _LimG<__dummy>::get_LD_qNaN() {  const int __use_double_limits = sizeof(double) == sizeof(long double) ? 1 : 0;  return _NumericLimitsAccess<__use_double_limits>::get_qNaN();}template <class __dummy>long double _STLP_CALL _LimG<__dummy>::get_LD_sNaN() {  const int __use_double_limits = sizeof(double) == sizeof(long double) ? 1 : 0;  return _NumericLimitsAccess<__use_double_limits>::get_sNaN();}template <class __dummy>long double _STLP_CALL _LimG<__dummy>::get_LD_denormMin() {  typedef float_helper<long double, 0x0001u> _FloatHelper;  return _FloatHelper::get_from_first_word();}#  endif#endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */#undef _STLP_LIMITS_MIN_TYPE#undef _STLP_LIMITS_MAX_TYPE_STLP_MOVE_TO_STD_NAMESPACE_STLP_END_NAMESPACE#endif /* _STLP_LIMITS_C_INCLUDED */

⌨️ 快捷键说明

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