22#ifndef _STLP_INTERNAL_LIMITS
34#if !defined (_STLP_STATIC_CONST_INIT_BUG) && !defined (_STLP_NO_STATIC_CONST_DEFINITION)
36# define __declare_numeric_base_member(__type, __mem) \
37template <class __number> \
38 const __type _Numeric_limits_base<__number>:: __mem
63# undef __declare_numeric_base_member
65# define __declare_integer_limits_member(__type, __mem) \
66template <class _Int, _STLP_LIMITS_MIN_TYPE __imin, _STLP_LIMITS_MAX_TYPE __imax, int __idigits, bool __ismod> \
67 const __type _Integer_limits<_Int, __imin, __imax, __idigits, __ismod>:: __mem
78# undef __declare_integer_limits_member
80# if defined (__GNUC__) && (__GNUC__ != 2 || __GNUC_MINOR__ > 96) && (__GNUC__ != 3 || __GNUC_MINOR__ == 0) && (__GNUC__ <= 3)
83# define __declare_numeric_limits_member(__integer) \
84 _STLP_TEMPLATE_NULL const int numeric_limits<__integer>::digits; \
85 _STLP_TEMPLATE_NULL const int numeric_limits<__integer>::digits10; \
86 _STLP_TEMPLATE_NULL const int numeric_limits<__integer>::radix; \
87 _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_specialized; \
88 _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_signed; \
89 _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_integer; \
90 _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_exact; \
91 _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_bounded; \
92 _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_modulo
97# undef __declare_numeric_limits_member
102# define __declare_float_limits_member(__type, __mem) \
103template <class __number, \
104 int __Digits, int __Digits10, \
105 int __MinExp, int __MaxExp, \
106 int __MinExp10, int __MaxExp10, \
108 float_denorm_style __DenormStyle, \
109 float_round_style __RoundStyle> \
110const __type _Floating_limits< __number, __Digits, __Digits10, \
111 __MinExp, __MaxExp, __MinExp10, __MaxExp10, \
112 __IsIEC559, __DenormStyle, __RoundStyle>::\
134# undef __declare_float_limits_member
139#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
141# if defined (__GNUC__) || defined (__BORLANDC__)
142# define _STLP_ADDITIONAL_OPEN_BRACKET {
143# define _STLP_ADDITIONAL_CLOSE_BRACKET }
145# define _STLP_ADDITIONAL_OPEN_BRACKET
146# define _STLP_ADDITIONAL_CLOSE_BRACKET
154template<
class _Number,
unsigned short _Word>
157 unsigned short _Words[8];
161 _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET _Word, 0, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
165 _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET 0, 0, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
166 __tmp._Words[(
sizeof(_Number) >= 12 ? 10 :
sizeof(_Number)) /
sizeof(
unsigned short) - 1] = _Word;
170# if defined (_STLP_BIG_ENDIAN)
171 return get_word_higher();
173 return get_word_lower();
177# if defined (_STLP_BIG_ENDIAN)
178 return get_word_lower();
180 return get_word_higher();
185# if !defined (_STLP_NO_LONG_DOUBLE) && !defined (_STLP_BIG_ENDIAN)
186template<
class _Number,
unsigned short _Word1,
unsigned short _Word2>
187struct float_helper2 {
189 unsigned short _Words[8];
197 _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET 0, 0, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
198 __tmp._Words[(
sizeof(_Number) >= 12 ? 10 :
sizeof(_Number)) /
sizeof(
unsigned short) - 2] = _Word1;
199 __tmp._Words[(
sizeof(_Number) >= 12 ? 10 :
sizeof(_Number)) /
sizeof(
unsigned short) - 1] = _Word2;
206 return get_word_lower();
215# if defined (_STLP_BIG_ENDIAN)
216# if defined (__OS400__)
217# define _STLP_FLOAT_INF_REP { 0x7f80, 0 }
218# define _STLP_FLOAT_QNAN_REP { 0xffc0, 0 }
219# define _STLP_FLOAT_SNAN_REP { 0xff80, 0 }
220# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 }
221# define _STLP_DOUBLE_QNAN_REP { 0xfff8, 0, 0, 0 }
222# define _STLP_DOUBLE_SNAN_REP { 0xfff0, 0, 0, 0 }
223# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }
224# define _STLP_LDOUBLE_QNAN_REP { 0xfff8, 0, 0, 0, 0, 0, 0, 0 }
225# define _STLP_LDOUBLE_SNAN_REP { 0xfff0, 0, 0, 0, 0, 0, 0, 0 }
227# define _STLP_FLOAT_INF_REP { 0x7f80, 0 }
228# define _STLP_FLOAT_QNAN_REP { 0x7fc1, 0 }
229# define _STLP_FLOAT_SNAN_REP { 0x7f81, 0 }
230# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 }
231# define _STLP_DOUBLE_QNAN_REP { 0x7ff9, 0, 0, 0 }
232# define _STLP_DOUBLE_SNAN_REP { 0x7ff1, 0, 0, 0 }
233# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }
234# define _STLP_LDOUBLE_QNAN_REP { 0x7ff1, 0, 0, 0, 0, 0, 0, 0 }
235# define _STLP_LDOUBLE_SNAN_REP { 0x7ff9, 0, 0, 0, 0, 0, 0, 0 }
238# if defined(__DECCXX)
239# define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
240# define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 }
241# define _STLP_FLOAT_SNAN_REP { 0x5555, 0x7f85 }
242# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
243# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 }
244# define _STLP_DOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x7ff5 }
245# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0, 0, 0, 0, 0x7fff }
246# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0, 0, 0, 0x8000, 0xffff }
247# define _STLP_LDOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x7fff}
249# define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
250# define _STLP_FLOAT_QNAN_REP { 0, 0x7fc0 }
251# define _STLP_FLOAT_SNAN_REP { 0, 0x7fa0 }
252# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
253# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0x7ff8 }
254# define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0x7ff4 }
255# if defined (_STLP_MSVC) || defined (__ICL)
256# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 }
257# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 }
258# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF8, 0 }
259# elif defined (__BORLANDC__)
260# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff }
261# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xc000, 0x7fff }
262# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xa000, 0x7fff }
264# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff, 0 }
265# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xa000, 0x7fff, 0 }
266# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xc000, 0x7fff, 0 }
272 unsigned short rep[2];
276 unsigned short rep[4];
280# ifndef _STLP_NO_LONG_DOUBLE
282 unsigned short rep[8];
288template <
class __dummy>
290 typedef float_helper<float, 0x7f80u> _FloatHelper;
291 return _FloatHelper::get_from_last_word();
293template <
class __dummy>
295 typedef float_helper<float, 0x7f81u> _FloatHelper;
296 return _FloatHelper::get_from_last_word();
298template <
class __dummy>
300 typedef float_helper<float, 0x7fc1u> _FloatHelper;
301 return _FloatHelper::get_from_last_word();
303template <
class __dummy>
305 typedef float_helper<float, 0x0001u> _FloatHelper;
306 return _FloatHelper::get_from_first_word();
309template <
int __use_
double_limits>
310class _NumericLimitsAccess;
313class _NumericLimitsAccess<1> {
315 static double get_inf() {
316 typedef float_helper<double, 0x7ff0u> _FloatHelper;
317 return _FloatHelper::get_from_last_word();
319 static double get_qNaN() {
320 typedef float_helper<double, 0x7ff1u> _FloatHelper;
321 return _FloatHelper::get_from_last_word();
323 static double get_sNaN() {
324 typedef float_helper<double, 0x7ff9u> _FloatHelper;
325 return _FloatHelper::get_from_last_word();
329template <
class __dummy>
331{
return _NumericLimitsAccess<1>::get_inf(); }
332template <
class __dummy>
334{
return _NumericLimitsAccess<1>::get_qNaN(); }
335template <
class __dummy>
337{
return _NumericLimitsAccess<1>::get_sNaN(); }
338template <
class __dummy>
340 typedef float_helper<double, 0x0001u> _FloatHelper;
341 return _FloatHelper::get_from_first_word();
344# if !defined (_STLP_NO_LONG_DOUBLE)
346class _NumericLimitsAccess<0> {
348 static long double get_inf() {
349# if defined (_STLP_BIG_ENDIAN)
350 typedef float_helper<long double, 0x7ff0u> _FloatHelper;
352 typedef float_helper2<long double, 0x8000u, 0x7fffu> _FloatHelper;
354 return _FloatHelper::get_from_last_word();
356 static long double get_qNaN() {
357# if defined (_STLP_BIG_ENDIAN)
358 typedef float_helper<long double, 0x7ff1u> _FloatHelper;
360 typedef float_helper2<long double, 0xc000u, 0x7fffu> _FloatHelper;
362 return _FloatHelper::get_from_last_word();
364 static long double get_sNaN() {
365# if defined (_STLP_BIG_ENDIAN)
366 typedef float_helper<long double, 0x7ff9u> _FloatHelper;
368 typedef float_helper2<long double, 0x9000u, 0x7fffu> _FloatHelper;
370 return _FloatHelper::get_from_last_word();
374template <
class __dummy>
376 const int __use_double_limits =
sizeof(
double) ==
sizeof(
long double) ? 1 : 0;
377 return _NumericLimitsAccess<__use_double_limits>::get_inf();
379template <
class __dummy>
381 const int __use_double_limits =
sizeof(
double) ==
sizeof(
long double) ? 1 : 0;
382 return _NumericLimitsAccess<__use_double_limits>::get_qNaN();
384template <
class __dummy>
386 const int __use_double_limits =
sizeof(
double) ==
sizeof(
long double) ? 1 : 0;
387 return _NumericLimitsAccess<__use_double_limits>::get_sNaN();
389template <
class __dummy>
391 typedef float_helper<long double, 0x0001u> _FloatHelper;
392 return _FloatHelper::get_from_first_word();
398#undef _STLP_LIMITS_MIN_TYPE
399#undef _STLP_LIMITS_MAX_TYPE
#define __declare_integer_limits_member(__type, __mem)
#define __declare_numeric_base_member(__type, __mem)
#define __declare_float_limits_member(__type, __mem)
static double _STLP_CALL get_D_qNaN()
static long double _STLP_CALL get_LD_qNaN()
static float _STLP_CALL get_F_sNaN()
static long double _STLP_CALL get_LD_sNaN()
static double _STLP_CALL get_D_inf()
static float _STLP_CALL get_F_qNaN()
static long double _STLP_CALL get_LD_denormMin()
static double _STLP_CALL get_D_sNaN()
static long double _STLP_CALL get_LD_inf()
static double _STLP_CALL get_D_denormMin()
static float _STLP_CALL get_F_inf()
static float _STLP_CALL get_F_denormMin()
#define _STLP_TEMPLATE_NULL
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
static const int digits[]
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static BOOL is_integer(parse_buffer *buf)