1 |
35 |
ultra_embe |
// The template and inlines for the numeric_limits classes. -*- C++ -*-
|
2 |
|
|
|
3 |
|
|
// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
4 |
|
|
// 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
5 |
|
|
//
|
6 |
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
7 |
|
|
// software; you can redistribute it and/or modify it under the
|
8 |
|
|
// terms of the GNU General Public License as published by the
|
9 |
|
|
// Free Software Foundation; either version 3, or (at your option)
|
10 |
|
|
// any later version.
|
11 |
|
|
|
12 |
|
|
// This library is distributed in the hope that it will be useful,
|
13 |
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
|
|
// GNU General Public License for more details.
|
16 |
|
|
|
17 |
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
18 |
|
|
// permissions described in the GCC Runtime Library Exception, version
|
19 |
|
|
// 3.1, as published by the Free Software Foundation.
|
20 |
|
|
|
21 |
|
|
// You should have received a copy of the GNU General Public License and
|
22 |
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
23 |
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
24 |
|
|
// .
|
25 |
|
|
|
26 |
|
|
/** @file include/limits
|
27 |
|
|
* This is a Standard C++ Library header.
|
28 |
|
|
*/
|
29 |
|
|
|
30 |
|
|
// Note: this is not a conforming implementation.
|
31 |
|
|
// Written by Gabriel Dos Reis
|
32 |
|
|
|
33 |
|
|
//
|
34 |
|
|
// ISO 14882:1998
|
35 |
|
|
// 18.2.1
|
36 |
|
|
//
|
37 |
|
|
|
38 |
|
|
#ifndef _GLIBCXX_NUMERIC_LIMITS
|
39 |
|
|
#define _GLIBCXX_NUMERIC_LIMITS 1
|
40 |
|
|
|
41 |
|
|
#pragma GCC system_header
|
42 |
|
|
|
43 |
|
|
#include
|
44 |
|
|
|
45 |
|
|
//
|
46 |
|
|
// The numeric_limits<> traits document implementation-defined aspects
|
47 |
|
|
// of fundamental arithmetic data types (integers and floating points).
|
48 |
|
|
// From Standard C++ point of view, there are 14 such types:
|
49 |
|
|
// * integers
|
50 |
|
|
// bool (1)
|
51 |
|
|
// char, signed char, unsigned char, wchar_t (4)
|
52 |
|
|
// short, unsigned short (2)
|
53 |
|
|
// int, unsigned (2)
|
54 |
|
|
// long, unsigned long (2)
|
55 |
|
|
//
|
56 |
|
|
// * floating points
|
57 |
|
|
// float (1)
|
58 |
|
|
// double (1)
|
59 |
|
|
// long double (1)
|
60 |
|
|
//
|
61 |
|
|
// GNU C++ understands (where supported by the host C-library)
|
62 |
|
|
// * integer
|
63 |
|
|
// long long, unsigned long long (2)
|
64 |
|
|
//
|
65 |
|
|
// which brings us to 16 fundamental arithmetic data types in GNU C++.
|
66 |
|
|
//
|
67 |
|
|
//
|
68 |
|
|
// Since a numeric_limits<> is a bit tricky to get right, we rely on
|
69 |
|
|
// an interface composed of macros which should be defined in config/os
|
70 |
|
|
// or config/cpu when they differ from the generic (read arbitrary)
|
71 |
|
|
// definitions given here.
|
72 |
|
|
//
|
73 |
|
|
|
74 |
|
|
// These values can be overridden in the target configuration file.
|
75 |
|
|
// The default values are appropriate for many 32-bit targets.
|
76 |
|
|
|
77 |
|
|
// GCC only intrinsically supports modulo integral types. The only remaining
|
78 |
|
|
// integral exceptional values is division by zero. Only targets that do not
|
79 |
|
|
// signal division by zero in some "hard to ignore" way should use false.
|
80 |
|
|
#ifndef __glibcxx_integral_traps
|
81 |
|
|
# define __glibcxx_integral_traps true
|
82 |
|
|
#endif
|
83 |
|
|
|
84 |
|
|
// float
|
85 |
|
|
//
|
86 |
|
|
|
87 |
|
|
// Default values. Should be overridden in configuration files if necessary.
|
88 |
|
|
|
89 |
|
|
#ifndef __glibcxx_float_has_denorm_loss
|
90 |
|
|
# define __glibcxx_float_has_denorm_loss false
|
91 |
|
|
#endif
|
92 |
|
|
#ifndef __glibcxx_float_traps
|
93 |
|
|
# define __glibcxx_float_traps false
|
94 |
|
|
#endif
|
95 |
|
|
#ifndef __glibcxx_float_tinyness_before
|
96 |
|
|
# define __glibcxx_float_tinyness_before false
|
97 |
|
|
#endif
|
98 |
|
|
|
99 |
|
|
// double
|
100 |
|
|
|
101 |
|
|
// Default values. Should be overridden in configuration files if necessary.
|
102 |
|
|
|
103 |
|
|
#ifndef __glibcxx_double_has_denorm_loss
|
104 |
|
|
# define __glibcxx_double_has_denorm_loss false
|
105 |
|
|
#endif
|
106 |
|
|
#ifndef __glibcxx_double_traps
|
107 |
|
|
# define __glibcxx_double_traps false
|
108 |
|
|
#endif
|
109 |
|
|
#ifndef __glibcxx_double_tinyness_before
|
110 |
|
|
# define __glibcxx_double_tinyness_before false
|
111 |
|
|
#endif
|
112 |
|
|
|
113 |
|
|
// long double
|
114 |
|
|
|
115 |
|
|
// Default values. Should be overridden in configuration files if necessary.
|
116 |
|
|
|
117 |
|
|
#ifndef __glibcxx_long_double_has_denorm_loss
|
118 |
|
|
# define __glibcxx_long_double_has_denorm_loss false
|
119 |
|
|
#endif
|
120 |
|
|
#ifndef __glibcxx_long_double_traps
|
121 |
|
|
# define __glibcxx_long_double_traps false
|
122 |
|
|
#endif
|
123 |
|
|
#ifndef __glibcxx_long_double_tinyness_before
|
124 |
|
|
# define __glibcxx_long_double_tinyness_before false
|
125 |
|
|
#endif
|
126 |
|
|
|
127 |
|
|
// You should not need to define any macros below this point.
|
128 |
|
|
|
129 |
|
|
#define __glibcxx_signed(T) ((T)(-1) < 0)
|
130 |
|
|
|
131 |
|
|
#define __glibcxx_min(T) \
|
132 |
|
|
(__glibcxx_signed (T) ? -__glibcxx_max (T) - 1 : (T)0)
|
133 |
|
|
|
134 |
|
|
#define __glibcxx_max(T) \
|
135 |
|
|
(__glibcxx_signed (T) ? \
|
136 |
|
|
(((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
|
137 |
|
|
|
138 |
|
|
#define __glibcxx_digits(T) \
|
139 |
|
|
(sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
|
140 |
|
|
|
141 |
|
|
// The fraction 643/2136 approximates log10(2) to 7 significant digits.
|
142 |
|
|
#define __glibcxx_digits10(T) \
|
143 |
|
|
(__glibcxx_digits (T) * 643L / 2136)
|
144 |
|
|
|
145 |
|
|
#define __glibcxx_max_digits10(T) \
|
146 |
|
|
(2 + (T) * 643L / 2136)
|
147 |
|
|
|
148 |
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
149 |
|
|
{
|
150 |
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
151 |
|
|
|
152 |
|
|
/**
|
153 |
|
|
* @brief Describes the rounding style for floating-point types.
|
154 |
|
|
*
|
155 |
|
|
* This is used in the std::numeric_limits class.
|
156 |
|
|
*/
|
157 |
|
|
enum float_round_style
|
158 |
|
|
{
|
159 |
|
|
round_indeterminate = -1, /// Intermediate.
|
160 |
|
|
round_toward_zero = 0, /// To zero.
|
161 |
|
|
round_to_nearest = 1, /// To the nearest representable value.
|
162 |
|
|
round_toward_infinity = 2, /// To infinity.
|
163 |
|
|
round_toward_neg_infinity = 3 /// To negative infinity.
|
164 |
|
|
};
|
165 |
|
|
|
166 |
|
|
/**
|
167 |
|
|
* @brief Describes the denormalization for floating-point types.
|
168 |
|
|
*
|
169 |
|
|
* These values represent the presence or absence of a variable number
|
170 |
|
|
* of exponent bits. This type is used in the std::numeric_limits class.
|
171 |
|
|
*/
|
172 |
|
|
enum float_denorm_style
|
173 |
|
|
{
|
174 |
|
|
/// Indeterminate at compile time whether denormalized values are allowed.
|
175 |
|
|
denorm_indeterminate = -1,
|
176 |
|
|
/// The type does not allow denormalized values.
|
177 |
|
|
denorm_absent = 0,
|
178 |
|
|
/// The type allows denormalized values.
|
179 |
|
|
denorm_present = 1
|
180 |
|
|
};
|
181 |
|
|
|
182 |
|
|
/**
|
183 |
|
|
* @brief Part of std::numeric_limits.
|
184 |
|
|
*
|
185 |
|
|
* The @c static @c const members are usable as integral constant
|
186 |
|
|
* expressions.
|
187 |
|
|
*
|
188 |
|
|
* @note This is a separate class for purposes of efficiency; you
|
189 |
|
|
* should only access these members as part of an instantiation
|
190 |
|
|
* of the std::numeric_limits class.
|
191 |
|
|
*/
|
192 |
|
|
struct __numeric_limits_base
|
193 |
|
|
{
|
194 |
|
|
/** This will be true for all fundamental types (which have
|
195 |
|
|
specializations), and false for everything else. */
|
196 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = false;
|
197 |
|
|
|
198 |
|
|
/** The number of @c radix digits that be represented without change: for
|
199 |
|
|
integer types, the number of non-sign bits in the mantissa; for
|
200 |
|
|
floating types, the number of @c radix digits in the mantissa. */
|
201 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = 0;
|
202 |
|
|
|
203 |
|
|
/** The number of base 10 digits that can be represented without change. */
|
204 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
|
205 |
|
|
|
206 |
|
|
#if __cplusplus >= 201103L
|
207 |
|
|
/** The number of base 10 digits required to ensure that values which
|
208 |
|
|
differ are always differentiated. */
|
209 |
|
|
static constexpr int max_digits10 = 0;
|
210 |
|
|
#endif
|
211 |
|
|
|
212 |
|
|
/** True if the type is signed. */
|
213 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
214 |
|
|
|
215 |
|
|
/** True if the type is integer.
|
216 |
|
|
* Is this supposed to be if the type is integral? */
|
217 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
|
218 |
|
|
|
219 |
|
|
/** True if the type uses an exact representation. All integer types are
|
220 |
|
|
exact, but not all exact types are integer. For example, rational and
|
221 |
|
|
fixed-exponent representations are exact but not integer.
|
222 |
|
|
[18.2.1.2]/15 */
|
223 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
|
224 |
|
|
|
225 |
|
|
/** For integer types, specifies the base of the representation. For
|
226 |
|
|
floating types, specifies the base of the exponent representation. */
|
227 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 0;
|
228 |
|
|
|
229 |
|
|
/** The minimum negative integer such that @c radix raised to the power of
|
230 |
|
|
(one less than that integer) is a normalized floating point number. */
|
231 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
232 |
|
|
|
233 |
|
|
/** The minimum negative integer such that 10 raised to that power is in
|
234 |
|
|
the range of normalized floating point numbers. */
|
235 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
236 |
|
|
|
237 |
|
|
/** The maximum positive integer such that @c radix raised to the power of
|
238 |
|
|
(one less than that integer) is a representable finite floating point
|
239 |
|
|
number. */
|
240 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
241 |
|
|
|
242 |
|
|
/** The maximum positive integer such that 10 raised to that power is in
|
243 |
|
|
the range of representable finite floating point numbers. */
|
244 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
245 |
|
|
|
246 |
|
|
/** True if the type has a representation for positive infinity. */
|
247 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
248 |
|
|
|
249 |
|
|
/** True if the type has a representation for a quiet (non-signaling)
|
250 |
|
|
Not a Number. */
|
251 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
252 |
|
|
|
253 |
|
|
/** True if the type has a representation for a signaling
|
254 |
|
|
Not a Number. */
|
255 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
256 |
|
|
|
257 |
|
|
/** See std::float_denorm_style for more information. */
|
258 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
|
259 |
|
|
|
260 |
|
|
/** True if loss of accuracy is detected as a denormalization loss,
|
261 |
|
|
rather than as an inexact result. [18.2.1.2]/42 */
|
262 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
263 |
|
|
|
264 |
|
|
/** True if-and-only-if the type adheres to the IEC 559 standard, also
|
265 |
|
|
known as IEEE 754. (Only makes sense for floating point types.) */
|
266 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
267 |
|
|
|
268 |
|
|
/** True if the set of values representable by the type is
|
269 |
|
|
finite. All built-in types are bounded, this member would be
|
270 |
|
|
false for arbitrary precision types. [18.2.1.2]/54 */
|
271 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = false;
|
272 |
|
|
|
273 |
|
|
/** True if the type is @e modulo. A type is modulo if, for any
|
274 |
|
|
operation involving +, -, or * on values of that type whose
|
275 |
|
|
result would fall outside the range [min(),max()], the value
|
276 |
|
|
returned differs from the true value by an integer multiple of
|
277 |
|
|
max() - min() + 1. On most machines, this is false for floating
|
278 |
|
|
types, true for unsigned integers, and true for signed integers.
|
279 |
|
|
See PR22200 about signed integers. */
|
280 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
281 |
|
|
|
282 |
|
|
/** True if trapping is implemented for this type. */
|
283 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = false;
|
284 |
|
|
|
285 |
|
|
/** True if tininess is detected before rounding. (see IEC 559) */
|
286 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
287 |
|
|
|
288 |
|
|
/** See std::float_round_style for more information. This is only
|
289 |
|
|
meaningful for floating types; integer types will all be
|
290 |
|
|
round_toward_zero. */
|
291 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
|
292 |
|
|
round_toward_zero;
|
293 |
|
|
};
|
294 |
|
|
|
295 |
|
|
/**
|
296 |
|
|
* @brief Properties of fundamental types.
|
297 |
|
|
*
|
298 |
|
|
* This class allows a program to obtain information about the
|
299 |
|
|
* representation of a fundamental type on a given platform. For
|
300 |
|
|
* non-fundamental types, the functions will return 0 and the data
|
301 |
|
|
* members will all be @c false.
|
302 |
|
|
*
|
303 |
|
|
* _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are
|
304 |
|
|
* noted, but not incorporated in this documented (yet).
|
305 |
|
|
*/
|
306 |
|
|
template
|
307 |
|
|
struct numeric_limits : public __numeric_limits_base
|
308 |
|
|
{
|
309 |
|
|
/** The minimum finite value, or for floating types with
|
310 |
|
|
denormalization, the minimum positive normalized value. */
|
311 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
312 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
313 |
|
|
|
314 |
|
|
/** The maximum finite value. */
|
315 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
316 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
317 |
|
|
|
318 |
|
|
#if __cplusplus >= 201103L
|
319 |
|
|
/** A finite value x such that there is no other finite value y
|
320 |
|
|
* where y < x. */
|
321 |
|
|
static constexpr _Tp
|
322 |
|
|
lowest() noexcept { return _Tp(); }
|
323 |
|
|
#endif
|
324 |
|
|
|
325 |
|
|
/** The @e machine @e epsilon: the difference between 1 and the least
|
326 |
|
|
value greater than 1 that is representable. */
|
327 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
328 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
329 |
|
|
|
330 |
|
|
/** The maximum rounding error measurement (see LIA-1). */
|
331 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
332 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
333 |
|
|
|
334 |
|
|
/** The representation of positive infinity, if @c has_infinity. */
|
335 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
336 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
337 |
|
|
|
338 |
|
|
/** The representation of a quiet Not a Number,
|
339 |
|
|
if @c has_quiet_NaN. */
|
340 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
341 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
342 |
|
|
|
343 |
|
|
/** The representation of a signaling Not a Number, if
|
344 |
|
|
@c has_signaling_NaN. */
|
345 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
346 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
347 |
|
|
|
348 |
|
|
/** The minimum positive denormalized value. For types where
|
349 |
|
|
@c has_denorm is false, this is the minimum positive normalized
|
350 |
|
|
value. */
|
351 |
|
|
static _GLIBCXX_CONSTEXPR _Tp
|
352 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
|
353 |
|
|
};
|
354 |
|
|
|
355 |
|
|
#if __cplusplus >= 201103L
|
356 |
|
|
template
|
357 |
|
|
struct numeric_limits
|
358 |
|
|
: public numeric_limits<_Tp> { };
|
359 |
|
|
|
360 |
|
|
template
|
361 |
|
|
struct numeric_limits
|
362 |
|
|
: public numeric_limits<_Tp> { };
|
363 |
|
|
|
364 |
|
|
template
|
365 |
|
|
struct numeric_limits
|
366 |
|
|
: public numeric_limits<_Tp> { };
|
367 |
|
|
#endif
|
368 |
|
|
|
369 |
|
|
// Now there follow 16 explicit specializations. Yes, 16. Make sure
|
370 |
|
|
// you get the count right. (18 in c++0x mode)
|
371 |
|
|
|
372 |
|
|
/// numeric_limits specialization.
|
373 |
|
|
template<>
|
374 |
|
|
struct numeric_limits
|
375 |
|
|
{
|
376 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
377 |
|
|
|
378 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
379 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return false; }
|
380 |
|
|
|
381 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
382 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return true; }
|
383 |
|
|
|
384 |
|
|
#if __cplusplus >= 201103L
|
385 |
|
|
static constexpr bool
|
386 |
|
|
lowest() noexcept { return min(); }
|
387 |
|
|
#endif
|
388 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = 1;
|
389 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
|
390 |
|
|
#if __cplusplus >= 201103L
|
391 |
|
|
static constexpr int max_digits10 = 0;
|
392 |
|
|
#endif
|
393 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
394 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
395 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
396 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
397 |
|
|
|
398 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
399 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return false; }
|
400 |
|
|
|
401 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
402 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return false; }
|
403 |
|
|
|
404 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
405 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
406 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
407 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
408 |
|
|
|
409 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
410 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
411 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
412 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
413 |
|
|
= denorm_absent;
|
414 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
415 |
|
|
|
416 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
417 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return false; }
|
418 |
|
|
|
419 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
420 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
|
421 |
|
|
|
422 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
423 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
|
424 |
|
|
|
425 |
|
|
static _GLIBCXX_CONSTEXPR bool
|
426 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; }
|
427 |
|
|
|
428 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
429 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
430 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
431 |
|
|
|
432 |
|
|
// It is not clear what it means for a boolean type to trap.
|
433 |
|
|
// This is a DR on the LWG issue list. Here, I use integer
|
434 |
|
|
// promotion semantics.
|
435 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
436 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
437 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
438 |
|
|
= round_toward_zero;
|
439 |
|
|
};
|
440 |
|
|
|
441 |
|
|
/// numeric_limits specialization.
|
442 |
|
|
template<>
|
443 |
|
|
struct numeric_limits
|
444 |
|
|
{
|
445 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
446 |
|
|
|
447 |
|
|
static _GLIBCXX_CONSTEXPR char
|
448 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
|
449 |
|
|
|
450 |
|
|
static _GLIBCXX_CONSTEXPR char
|
451 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
|
452 |
|
|
|
453 |
|
|
#if __cplusplus >= 201103L
|
454 |
|
|
static constexpr char
|
455 |
|
|
lowest() noexcept { return min(); }
|
456 |
|
|
#endif
|
457 |
|
|
|
458 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
|
459 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char);
|
460 |
|
|
#if __cplusplus >= 201103L
|
461 |
|
|
static constexpr int max_digits10 = 0;
|
462 |
|
|
#endif
|
463 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char);
|
464 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
465 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
466 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
467 |
|
|
|
468 |
|
|
static _GLIBCXX_CONSTEXPR char
|
469 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
470 |
|
|
|
471 |
|
|
static _GLIBCXX_CONSTEXPR char
|
472 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
473 |
|
|
|
474 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
475 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
476 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
477 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
478 |
|
|
|
479 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
480 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
481 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
482 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
483 |
|
|
= denorm_absent;
|
484 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
485 |
|
|
|
486 |
|
|
static _GLIBCXX_CONSTEXPR
|
487 |
|
|
char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); }
|
488 |
|
|
|
489 |
|
|
static _GLIBCXX_CONSTEXPR char
|
490 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
|
491 |
|
|
|
492 |
|
|
static _GLIBCXX_CONSTEXPR char
|
493 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
|
494 |
|
|
|
495 |
|
|
static _GLIBCXX_CONSTEXPR char
|
496 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
497 |
|
|
|
498 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
499 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
500 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
|
501 |
|
|
|
502 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
503 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
504 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
505 |
|
|
= round_toward_zero;
|
506 |
|
|
};
|
507 |
|
|
|
508 |
|
|
/// numeric_limits specialization.
|
509 |
|
|
template<>
|
510 |
|
|
struct numeric_limits
|
511 |
|
|
{
|
512 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
513 |
|
|
|
514 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
515 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
|
516 |
|
|
|
517 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
518 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
|
519 |
|
|
|
520 |
|
|
#if __cplusplus >= 201103L
|
521 |
|
|
static constexpr signed char
|
522 |
|
|
lowest() noexcept { return min(); }
|
523 |
|
|
#endif
|
524 |
|
|
|
525 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
|
526 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
527 |
|
|
= __glibcxx_digits10 (signed char);
|
528 |
|
|
#if __cplusplus >= 201103L
|
529 |
|
|
static constexpr int max_digits10 = 0;
|
530 |
|
|
#endif
|
531 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
532 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
533 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
534 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
535 |
|
|
|
536 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
537 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
538 |
|
|
|
539 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
540 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
541 |
|
|
|
542 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
543 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
544 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
545 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
546 |
|
|
|
547 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
548 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
549 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
550 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
551 |
|
|
= denorm_absent;
|
552 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
553 |
|
|
|
554 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
555 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
556 |
|
|
|
557 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
558 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
559 |
|
|
|
560 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
561 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
562 |
|
|
{ return static_cast(0); }
|
563 |
|
|
|
564 |
|
|
static _GLIBCXX_CONSTEXPR signed char
|
565 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
566 |
|
|
{ return static_cast(0); }
|
567 |
|
|
|
568 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
569 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
570 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
571 |
|
|
|
572 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
573 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
574 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
575 |
|
|
= round_toward_zero;
|
576 |
|
|
};
|
577 |
|
|
|
578 |
|
|
/// numeric_limits specialization.
|
579 |
|
|
template<>
|
580 |
|
|
struct numeric_limits
|
581 |
|
|
{
|
582 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
583 |
|
|
|
584 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
585 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
586 |
|
|
|
587 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
588 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
|
589 |
|
|
|
590 |
|
|
#if __cplusplus >= 201103L
|
591 |
|
|
static constexpr unsigned char
|
592 |
|
|
lowest() noexcept { return min(); }
|
593 |
|
|
#endif
|
594 |
|
|
|
595 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
596 |
|
|
= __glibcxx_digits (unsigned char);
|
597 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
598 |
|
|
= __glibcxx_digits10 (unsigned char);
|
599 |
|
|
#if __cplusplus >= 201103L
|
600 |
|
|
static constexpr int max_digits10 = 0;
|
601 |
|
|
#endif
|
602 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
603 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
604 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
605 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
606 |
|
|
|
607 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
608 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
609 |
|
|
|
610 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
611 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
612 |
|
|
|
613 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
614 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
615 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
616 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
617 |
|
|
|
618 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
619 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
620 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
621 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
622 |
|
|
= denorm_absent;
|
623 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
624 |
|
|
|
625 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
626 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT
|
627 |
|
|
{ return static_cast(0); }
|
628 |
|
|
|
629 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
630 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
631 |
|
|
{ return static_cast(0); }
|
632 |
|
|
|
633 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
634 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
635 |
|
|
{ return static_cast(0); }
|
636 |
|
|
|
637 |
|
|
static _GLIBCXX_CONSTEXPR unsigned char
|
638 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
639 |
|
|
{ return static_cast(0); }
|
640 |
|
|
|
641 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
642 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
643 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
|
644 |
|
|
|
645 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
646 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
647 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
648 |
|
|
= round_toward_zero;
|
649 |
|
|
};
|
650 |
|
|
|
651 |
|
|
/// numeric_limits specialization.
|
652 |
|
|
template<>
|
653 |
|
|
struct numeric_limits
|
654 |
|
|
{
|
655 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
656 |
|
|
|
657 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
658 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
|
659 |
|
|
|
660 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
661 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
|
662 |
|
|
|
663 |
|
|
#if __cplusplus >= 201103L
|
664 |
|
|
static constexpr wchar_t
|
665 |
|
|
lowest() noexcept { return min(); }
|
666 |
|
|
#endif
|
667 |
|
|
|
668 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
|
669 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
670 |
|
|
= __glibcxx_digits10 (wchar_t);
|
671 |
|
|
#if __cplusplus >= 201103L
|
672 |
|
|
static constexpr int max_digits10 = 0;
|
673 |
|
|
#endif
|
674 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t);
|
675 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
676 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
677 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
678 |
|
|
|
679 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
680 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
681 |
|
|
|
682 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
683 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
684 |
|
|
|
685 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
686 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
687 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
688 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
689 |
|
|
|
690 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
691 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
692 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
693 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
694 |
|
|
= denorm_absent;
|
695 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
696 |
|
|
|
697 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
698 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
|
699 |
|
|
|
700 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
701 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
|
702 |
|
|
|
703 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
704 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
|
705 |
|
|
|
706 |
|
|
static _GLIBCXX_CONSTEXPR wchar_t
|
707 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
|
708 |
|
|
|
709 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
710 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
711 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
|
712 |
|
|
|
713 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
714 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
715 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
716 |
|
|
= round_toward_zero;
|
717 |
|
|
};
|
718 |
|
|
|
719 |
|
|
#if __cplusplus >= 201103L
|
720 |
|
|
/// numeric_limits specialization.
|
721 |
|
|
template<>
|
722 |
|
|
struct numeric_limits
|
723 |
|
|
{
|
724 |
|
|
static constexpr bool is_specialized = true;
|
725 |
|
|
|
726 |
|
|
static constexpr char16_t
|
727 |
|
|
min() noexcept { return __glibcxx_min (char16_t); }
|
728 |
|
|
|
729 |
|
|
static constexpr char16_t
|
730 |
|
|
max() noexcept { return __glibcxx_max (char16_t); }
|
731 |
|
|
|
732 |
|
|
static constexpr char16_t
|
733 |
|
|
lowest() noexcept { return min(); }
|
734 |
|
|
|
735 |
|
|
static constexpr int digits = __glibcxx_digits (char16_t);
|
736 |
|
|
static constexpr int digits10 = __glibcxx_digits10 (char16_t);
|
737 |
|
|
static constexpr int max_digits10 = 0;
|
738 |
|
|
static constexpr bool is_signed = __glibcxx_signed (char16_t);
|
739 |
|
|
static constexpr bool is_integer = true;
|
740 |
|
|
static constexpr bool is_exact = true;
|
741 |
|
|
static constexpr int radix = 2;
|
742 |
|
|
|
743 |
|
|
static constexpr char16_t
|
744 |
|
|
epsilon() noexcept { return 0; }
|
745 |
|
|
|
746 |
|
|
static constexpr char16_t
|
747 |
|
|
round_error() noexcept { return 0; }
|
748 |
|
|
|
749 |
|
|
static constexpr int min_exponent = 0;
|
750 |
|
|
static constexpr int min_exponent10 = 0;
|
751 |
|
|
static constexpr int max_exponent = 0;
|
752 |
|
|
static constexpr int max_exponent10 = 0;
|
753 |
|
|
|
754 |
|
|
static constexpr bool has_infinity = false;
|
755 |
|
|
static constexpr bool has_quiet_NaN = false;
|
756 |
|
|
static constexpr bool has_signaling_NaN = false;
|
757 |
|
|
static constexpr float_denorm_style has_denorm = denorm_absent;
|
758 |
|
|
static constexpr bool has_denorm_loss = false;
|
759 |
|
|
|
760 |
|
|
static constexpr char16_t
|
761 |
|
|
infinity() noexcept { return char16_t(); }
|
762 |
|
|
|
763 |
|
|
static constexpr char16_t
|
764 |
|
|
quiet_NaN() noexcept { return char16_t(); }
|
765 |
|
|
|
766 |
|
|
static constexpr char16_t
|
767 |
|
|
signaling_NaN() noexcept { return char16_t(); }
|
768 |
|
|
|
769 |
|
|
static constexpr char16_t
|
770 |
|
|
denorm_min() noexcept { return char16_t(); }
|
771 |
|
|
|
772 |
|
|
static constexpr bool is_iec559 = false;
|
773 |
|
|
static constexpr bool is_bounded = true;
|
774 |
|
|
static constexpr bool is_modulo = !is_signed;
|
775 |
|
|
|
776 |
|
|
static constexpr bool traps = __glibcxx_integral_traps;
|
777 |
|
|
static constexpr bool tinyness_before = false;
|
778 |
|
|
static constexpr float_round_style round_style = round_toward_zero;
|
779 |
|
|
};
|
780 |
|
|
|
781 |
|
|
/// numeric_limits specialization.
|
782 |
|
|
template<>
|
783 |
|
|
struct numeric_limits
|
784 |
|
|
{
|
785 |
|
|
static constexpr bool is_specialized = true;
|
786 |
|
|
|
787 |
|
|
static constexpr char32_t
|
788 |
|
|
min() noexcept { return __glibcxx_min (char32_t); }
|
789 |
|
|
|
790 |
|
|
static constexpr char32_t
|
791 |
|
|
max() noexcept { return __glibcxx_max (char32_t); }
|
792 |
|
|
|
793 |
|
|
static constexpr char32_t
|
794 |
|
|
lowest() noexcept { return min(); }
|
795 |
|
|
|
796 |
|
|
static constexpr int digits = __glibcxx_digits (char32_t);
|
797 |
|
|
static constexpr int digits10 = __glibcxx_digits10 (char32_t);
|
798 |
|
|
static constexpr int max_digits10 = 0;
|
799 |
|
|
static constexpr bool is_signed = __glibcxx_signed (char32_t);
|
800 |
|
|
static constexpr bool is_integer = true;
|
801 |
|
|
static constexpr bool is_exact = true;
|
802 |
|
|
static constexpr int radix = 2;
|
803 |
|
|
|
804 |
|
|
static constexpr char32_t
|
805 |
|
|
epsilon() noexcept { return 0; }
|
806 |
|
|
|
807 |
|
|
static constexpr char32_t
|
808 |
|
|
round_error() noexcept { return 0; }
|
809 |
|
|
|
810 |
|
|
static constexpr int min_exponent = 0;
|
811 |
|
|
static constexpr int min_exponent10 = 0;
|
812 |
|
|
static constexpr int max_exponent = 0;
|
813 |
|
|
static constexpr int max_exponent10 = 0;
|
814 |
|
|
|
815 |
|
|
static constexpr bool has_infinity = false;
|
816 |
|
|
static constexpr bool has_quiet_NaN = false;
|
817 |
|
|
static constexpr bool has_signaling_NaN = false;
|
818 |
|
|
static constexpr float_denorm_style has_denorm = denorm_absent;
|
819 |
|
|
static constexpr bool has_denorm_loss = false;
|
820 |
|
|
|
821 |
|
|
static constexpr char32_t
|
822 |
|
|
infinity() noexcept { return char32_t(); }
|
823 |
|
|
|
824 |
|
|
static constexpr char32_t
|
825 |
|
|
quiet_NaN() noexcept { return char32_t(); }
|
826 |
|
|
|
827 |
|
|
static constexpr char32_t
|
828 |
|
|
signaling_NaN() noexcept { return char32_t(); }
|
829 |
|
|
|
830 |
|
|
static constexpr char32_t
|
831 |
|
|
denorm_min() noexcept { return char32_t(); }
|
832 |
|
|
|
833 |
|
|
static constexpr bool is_iec559 = false;
|
834 |
|
|
static constexpr bool is_bounded = true;
|
835 |
|
|
static constexpr bool is_modulo = !is_signed;
|
836 |
|
|
|
837 |
|
|
static constexpr bool traps = __glibcxx_integral_traps;
|
838 |
|
|
static constexpr bool tinyness_before = false;
|
839 |
|
|
static constexpr float_round_style round_style = round_toward_zero;
|
840 |
|
|
};
|
841 |
|
|
#endif
|
842 |
|
|
|
843 |
|
|
/// numeric_limits specialization.
|
844 |
|
|
template<>
|
845 |
|
|
struct numeric_limits
|
846 |
|
|
{
|
847 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
848 |
|
|
|
849 |
|
|
static _GLIBCXX_CONSTEXPR short
|
850 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
|
851 |
|
|
|
852 |
|
|
static _GLIBCXX_CONSTEXPR short
|
853 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
|
854 |
|
|
|
855 |
|
|
#if __cplusplus >= 201103L
|
856 |
|
|
static constexpr short
|
857 |
|
|
lowest() noexcept { return min(); }
|
858 |
|
|
#endif
|
859 |
|
|
|
860 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
|
861 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short);
|
862 |
|
|
#if __cplusplus >= 201103L
|
863 |
|
|
static constexpr int max_digits10 = 0;
|
864 |
|
|
#endif
|
865 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
866 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
867 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
868 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
869 |
|
|
|
870 |
|
|
static _GLIBCXX_CONSTEXPR short
|
871 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
872 |
|
|
|
873 |
|
|
static _GLIBCXX_CONSTEXPR short
|
874 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
875 |
|
|
|
876 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
877 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
878 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
879 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
880 |
|
|
|
881 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
882 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
883 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
884 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
885 |
|
|
= denorm_absent;
|
886 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
887 |
|
|
|
888 |
|
|
static _GLIBCXX_CONSTEXPR short
|
889 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return short(); }
|
890 |
|
|
|
891 |
|
|
static _GLIBCXX_CONSTEXPR short
|
892 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
|
893 |
|
|
|
894 |
|
|
static _GLIBCXX_CONSTEXPR short
|
895 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
|
896 |
|
|
|
897 |
|
|
static _GLIBCXX_CONSTEXPR short
|
898 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); }
|
899 |
|
|
|
900 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
901 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
902 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
903 |
|
|
|
904 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
905 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
906 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
907 |
|
|
= round_toward_zero;
|
908 |
|
|
};
|
909 |
|
|
|
910 |
|
|
/// numeric_limits specialization.
|
911 |
|
|
template<>
|
912 |
|
|
struct numeric_limits
|
913 |
|
|
{
|
914 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
915 |
|
|
|
916 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
917 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
918 |
|
|
|
919 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
920 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
|
921 |
|
|
|
922 |
|
|
#if __cplusplus >= 201103L
|
923 |
|
|
static constexpr unsigned short
|
924 |
|
|
lowest() noexcept { return min(); }
|
925 |
|
|
#endif
|
926 |
|
|
|
927 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
928 |
|
|
= __glibcxx_digits (unsigned short);
|
929 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
930 |
|
|
= __glibcxx_digits10 (unsigned short);
|
931 |
|
|
#if __cplusplus >= 201103L
|
932 |
|
|
static constexpr int max_digits10 = 0;
|
933 |
|
|
#endif
|
934 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
935 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
936 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
937 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
938 |
|
|
|
939 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
940 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
941 |
|
|
|
942 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
943 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
944 |
|
|
|
945 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
946 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
947 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
948 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
949 |
|
|
|
950 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
951 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
952 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
953 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
954 |
|
|
= denorm_absent;
|
955 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
956 |
|
|
|
957 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
958 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT
|
959 |
|
|
{ return static_cast(0); }
|
960 |
|
|
|
961 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
962 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
963 |
|
|
{ return static_cast(0); }
|
964 |
|
|
|
965 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
966 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
967 |
|
|
{ return static_cast(0); }
|
968 |
|
|
|
969 |
|
|
static _GLIBCXX_CONSTEXPR unsigned short
|
970 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
971 |
|
|
{ return static_cast(0); }
|
972 |
|
|
|
973 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
974 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
975 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
|
976 |
|
|
|
977 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
978 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
979 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
980 |
|
|
= round_toward_zero;
|
981 |
|
|
};
|
982 |
|
|
|
983 |
|
|
/// numeric_limits specialization.
|
984 |
|
|
template<>
|
985 |
|
|
struct numeric_limits
|
986 |
|
|
{
|
987 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
988 |
|
|
|
989 |
|
|
static _GLIBCXX_CONSTEXPR int
|
990 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
|
991 |
|
|
|
992 |
|
|
static _GLIBCXX_CONSTEXPR int
|
993 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
|
994 |
|
|
|
995 |
|
|
#if __cplusplus >= 201103L
|
996 |
|
|
static constexpr int
|
997 |
|
|
lowest() noexcept { return min(); }
|
998 |
|
|
#endif
|
999 |
|
|
|
1000 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
|
1001 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int);
|
1002 |
|
|
#if __cplusplus >= 201103L
|
1003 |
|
|
static constexpr int max_digits10 = 0;
|
1004 |
|
|
#endif
|
1005 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1006 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1007 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1008 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1009 |
|
|
|
1010 |
|
|
static _GLIBCXX_CONSTEXPR int
|
1011 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1012 |
|
|
|
1013 |
|
|
static _GLIBCXX_CONSTEXPR int
|
1014 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1015 |
|
|
|
1016 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1017 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1018 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1019 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1020 |
|
|
|
1021 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1022 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1023 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1024 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1025 |
|
|
= denorm_absent;
|
1026 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1027 |
|
|
|
1028 |
|
|
static _GLIBCXX_CONSTEXPR int
|
1029 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1030 |
|
|
|
1031 |
|
|
static _GLIBCXX_CONSTEXPR int
|
1032 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1033 |
|
|
|
1034 |
|
|
static _GLIBCXX_CONSTEXPR int
|
1035 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1036 |
|
|
|
1037 |
|
|
static _GLIBCXX_CONSTEXPR int
|
1038 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1039 |
|
|
|
1040 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1041 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1042 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1043 |
|
|
|
1044 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1045 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1046 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1047 |
|
|
= round_toward_zero;
|
1048 |
|
|
};
|
1049 |
|
|
|
1050 |
|
|
/// numeric_limits specialization.
|
1051 |
|
|
template<>
|
1052 |
|
|
struct numeric_limits
|
1053 |
|
|
{
|
1054 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1055 |
|
|
|
1056 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1057 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1058 |
|
|
|
1059 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1060 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
|
1061 |
|
|
|
1062 |
|
|
#if __cplusplus >= 201103L
|
1063 |
|
|
static constexpr unsigned int
|
1064 |
|
|
lowest() noexcept { return min(); }
|
1065 |
|
|
#endif
|
1066 |
|
|
|
1067 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
1068 |
|
|
= __glibcxx_digits (unsigned int);
|
1069 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
1070 |
|
|
= __glibcxx_digits10 (unsigned int);
|
1071 |
|
|
#if __cplusplus >= 201103L
|
1072 |
|
|
static constexpr int max_digits10 = 0;
|
1073 |
|
|
#endif
|
1074 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
1075 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1076 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1077 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1078 |
|
|
|
1079 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1080 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1081 |
|
|
|
1082 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1083 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1084 |
|
|
|
1085 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1086 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1087 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1088 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1089 |
|
|
|
1090 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1091 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1092 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1093 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1094 |
|
|
= denorm_absent;
|
1095 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1096 |
|
|
|
1097 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1098 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1099 |
|
|
|
1100 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1101 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
1102 |
|
|
{ return static_cast(0); }
|
1103 |
|
|
|
1104 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1105 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
1106 |
|
|
{ return static_cast(0); }
|
1107 |
|
|
|
1108 |
|
|
static _GLIBCXX_CONSTEXPR unsigned int
|
1109 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
1110 |
|
|
{ return static_cast(0); }
|
1111 |
|
|
|
1112 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1113 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1114 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
|
1115 |
|
|
|
1116 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1117 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1118 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1119 |
|
|
= round_toward_zero;
|
1120 |
|
|
};
|
1121 |
|
|
|
1122 |
|
|
/// numeric_limits specialization.
|
1123 |
|
|
template<>
|
1124 |
|
|
struct numeric_limits
|
1125 |
|
|
{
|
1126 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1127 |
|
|
|
1128 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1129 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
|
1130 |
|
|
|
1131 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1132 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
|
1133 |
|
|
|
1134 |
|
|
#if __cplusplus >= 201103L
|
1135 |
|
|
static constexpr long
|
1136 |
|
|
lowest() noexcept { return min(); }
|
1137 |
|
|
#endif
|
1138 |
|
|
|
1139 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
|
1140 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long);
|
1141 |
|
|
#if __cplusplus >= 201103L
|
1142 |
|
|
static constexpr int max_digits10 = 0;
|
1143 |
|
|
#endif
|
1144 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1145 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1146 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1147 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1148 |
|
|
|
1149 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1150 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1151 |
|
|
|
1152 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1153 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1154 |
|
|
|
1155 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1156 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1157 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1158 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1159 |
|
|
|
1160 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1161 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1162 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1163 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1164 |
|
|
= denorm_absent;
|
1165 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1166 |
|
|
|
1167 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1168 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1169 |
|
|
|
1170 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1171 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1172 |
|
|
|
1173 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1174 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1175 |
|
|
|
1176 |
|
|
static _GLIBCXX_CONSTEXPR long
|
1177 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1178 |
|
|
|
1179 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1180 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1181 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1182 |
|
|
|
1183 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1184 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1185 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1186 |
|
|
= round_toward_zero;
|
1187 |
|
|
};
|
1188 |
|
|
|
1189 |
|
|
/// numeric_limits specialization.
|
1190 |
|
|
template<>
|
1191 |
|
|
struct numeric_limits
|
1192 |
|
|
{
|
1193 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1194 |
|
|
|
1195 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1196 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1197 |
|
|
|
1198 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1199 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
|
1200 |
|
|
|
1201 |
|
|
#if __cplusplus >= 201103L
|
1202 |
|
|
static constexpr unsigned long
|
1203 |
|
|
lowest() noexcept { return min(); }
|
1204 |
|
|
#endif
|
1205 |
|
|
|
1206 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
1207 |
|
|
= __glibcxx_digits (unsigned long);
|
1208 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
1209 |
|
|
= __glibcxx_digits10 (unsigned long);
|
1210 |
|
|
#if __cplusplus >= 201103L
|
1211 |
|
|
static constexpr int max_digits10 = 0;
|
1212 |
|
|
#endif
|
1213 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
1214 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1215 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1216 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1217 |
|
|
|
1218 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1219 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1220 |
|
|
|
1221 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1222 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1223 |
|
|
|
1224 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1225 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1226 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1227 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1228 |
|
|
|
1229 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1230 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1231 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1232 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1233 |
|
|
= denorm_absent;
|
1234 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1235 |
|
|
|
1236 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1237 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT
|
1238 |
|
|
{ return static_cast(0); }
|
1239 |
|
|
|
1240 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1241 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
1242 |
|
|
{ return static_cast(0); }
|
1243 |
|
|
|
1244 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1245 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
1246 |
|
|
{ return static_cast(0); }
|
1247 |
|
|
|
1248 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long
|
1249 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
1250 |
|
|
{ return static_cast(0); }
|
1251 |
|
|
|
1252 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1253 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1254 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
|
1255 |
|
|
|
1256 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1257 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1258 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1259 |
|
|
= round_toward_zero;
|
1260 |
|
|
};
|
1261 |
|
|
|
1262 |
|
|
/// numeric_limits specialization.
|
1263 |
|
|
template<>
|
1264 |
|
|
struct numeric_limits
|
1265 |
|
|
{
|
1266 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1267 |
|
|
|
1268 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1269 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
|
1270 |
|
|
|
1271 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1272 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
|
1273 |
|
|
|
1274 |
|
|
#if __cplusplus >= 201103L
|
1275 |
|
|
static constexpr long long
|
1276 |
|
|
lowest() noexcept { return min(); }
|
1277 |
|
|
#endif
|
1278 |
|
|
|
1279 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
1280 |
|
|
= __glibcxx_digits (long long);
|
1281 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
1282 |
|
|
= __glibcxx_digits10 (long long);
|
1283 |
|
|
#if __cplusplus >= 201103L
|
1284 |
|
|
static constexpr int max_digits10 = 0;
|
1285 |
|
|
#endif
|
1286 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1287 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1288 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1289 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1290 |
|
|
|
1291 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1292 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1293 |
|
|
|
1294 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1295 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1296 |
|
|
|
1297 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1298 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1299 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1300 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1301 |
|
|
|
1302 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1303 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1304 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1305 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1306 |
|
|
= denorm_absent;
|
1307 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1308 |
|
|
|
1309 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1310 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1311 |
|
|
|
1312 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1313 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1314 |
|
|
|
1315 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1316 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
1317 |
|
|
{ return static_cast(0); }
|
1318 |
|
|
|
1319 |
|
|
static _GLIBCXX_CONSTEXPR long long
|
1320 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); }
|
1321 |
|
|
|
1322 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1323 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1324 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1325 |
|
|
|
1326 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1327 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1328 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1329 |
|
|
= round_toward_zero;
|
1330 |
|
|
};
|
1331 |
|
|
|
1332 |
|
|
/// numeric_limits specialization.
|
1333 |
|
|
template<>
|
1334 |
|
|
struct numeric_limits
|
1335 |
|
|
{
|
1336 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1337 |
|
|
|
1338 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1339 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1340 |
|
|
|
1341 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1342 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
|
1343 |
|
|
|
1344 |
|
|
#if __cplusplus >= 201103L
|
1345 |
|
|
static constexpr unsigned long long
|
1346 |
|
|
lowest() noexcept { return min(); }
|
1347 |
|
|
#endif
|
1348 |
|
|
|
1349 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
1350 |
|
|
= __glibcxx_digits (unsigned long long);
|
1351 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
1352 |
|
|
= __glibcxx_digits10 (unsigned long long);
|
1353 |
|
|
#if __cplusplus >= 201103L
|
1354 |
|
|
static constexpr int max_digits10 = 0;
|
1355 |
|
|
#endif
|
1356 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
1357 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1358 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1359 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1360 |
|
|
|
1361 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1362 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1363 |
|
|
|
1364 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1365 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1366 |
|
|
|
1367 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1368 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1369 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1370 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1371 |
|
|
|
1372 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1373 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1374 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1375 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1376 |
|
|
= denorm_absent;
|
1377 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1378 |
|
|
|
1379 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1380 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT
|
1381 |
|
|
{ return static_cast(0); }
|
1382 |
|
|
|
1383 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1384 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
1385 |
|
|
{ return static_cast(0); }
|
1386 |
|
|
|
1387 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1388 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
1389 |
|
|
{ return static_cast(0); }
|
1390 |
|
|
|
1391 |
|
|
static _GLIBCXX_CONSTEXPR unsigned long long
|
1392 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
1393 |
|
|
{ return static_cast(0); }
|
1394 |
|
|
|
1395 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1396 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1397 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
|
1398 |
|
|
|
1399 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1400 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1401 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1402 |
|
|
= round_toward_zero;
|
1403 |
|
|
};
|
1404 |
|
|
|
1405 |
|
|
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
|
1406 |
|
|
/// numeric_limits<__int128> specialization.
|
1407 |
|
|
template<>
|
1408 |
|
|
struct numeric_limits<__int128>
|
1409 |
|
|
{
|
1410 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1411 |
|
|
|
1412 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1413 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (__int128); }
|
1414 |
|
|
|
1415 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1416 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (__int128); }
|
1417 |
|
|
|
1418 |
|
|
#if __cplusplus >= 201103L
|
1419 |
|
|
static constexpr __int128
|
1420 |
|
|
lowest() noexcept { return min(); }
|
1421 |
|
|
#endif
|
1422 |
|
|
|
1423 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
1424 |
|
|
= __glibcxx_digits (__int128);
|
1425 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
1426 |
|
|
= __glibcxx_digits10 (__int128);
|
1427 |
|
|
#if __cplusplus >= 201103L
|
1428 |
|
|
static constexpr int max_digits10 = 0;
|
1429 |
|
|
#endif
|
1430 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1431 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1432 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1433 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1434 |
|
|
|
1435 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1436 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1437 |
|
|
|
1438 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1439 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1440 |
|
|
|
1441 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1442 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1443 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1444 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1445 |
|
|
|
1446 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1447 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1448 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1449 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1450 |
|
|
= denorm_absent;
|
1451 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1452 |
|
|
|
1453 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1454 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT
|
1455 |
|
|
{ return static_cast<__int128>(0); }
|
1456 |
|
|
|
1457 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1458 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
1459 |
|
|
{ return static_cast<__int128>(0); }
|
1460 |
|
|
|
1461 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1462 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
1463 |
|
|
{ return static_cast<__int128>(0); }
|
1464 |
|
|
|
1465 |
|
|
static _GLIBCXX_CONSTEXPR __int128
|
1466 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
1467 |
|
|
{ return static_cast<__int128>(0); }
|
1468 |
|
|
|
1469 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1470 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1471 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1472 |
|
|
|
1473 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps
|
1474 |
|
|
= __glibcxx_integral_traps;
|
1475 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1476 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1477 |
|
|
= round_toward_zero;
|
1478 |
|
|
};
|
1479 |
|
|
|
1480 |
|
|
/// numeric_limits specialization.
|
1481 |
|
|
template<>
|
1482 |
|
|
struct numeric_limits
|
1483 |
|
|
{
|
1484 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1485 |
|
|
|
1486 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1487 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1488 |
|
|
|
1489 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1490 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (unsigned __int128); }
|
1491 |
|
|
|
1492 |
|
|
#if __cplusplus >= 201103L
|
1493 |
|
|
static constexpr unsigned __int128
|
1494 |
|
|
lowest() noexcept { return min(); }
|
1495 |
|
|
#endif
|
1496 |
|
|
|
1497 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits
|
1498 |
|
|
= __glibcxx_digits (unsigned __int128);
|
1499 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10
|
1500 |
|
|
= __glibcxx_digits10 (unsigned __int128);
|
1501 |
|
|
#if __cplusplus >= 201103L
|
1502 |
|
|
static constexpr int max_digits10 = 0;
|
1503 |
|
|
#endif
|
1504 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
|
1505 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
|
1506 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
|
1507 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
|
1508 |
|
|
|
1509 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1510 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1511 |
|
|
|
1512 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1513 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
|
1514 |
|
|
|
1515 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
|
1516 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
|
1517 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
|
1518 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
|
1519 |
|
|
|
1520 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
|
1521 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
|
1522 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
|
1523 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1524 |
|
|
= denorm_absent;
|
1525 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
|
1526 |
|
|
|
1527 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1528 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT
|
1529 |
|
|
{ return static_cast(0); }
|
1530 |
|
|
|
1531 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1532 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT
|
1533 |
|
|
{ return static_cast(0); }
|
1534 |
|
|
|
1535 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1536 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT
|
1537 |
|
|
{ return static_cast(0); }
|
1538 |
|
|
|
1539 |
|
|
static _GLIBCXX_CONSTEXPR unsigned __int128
|
1540 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT
|
1541 |
|
|
{ return static_cast(0); }
|
1542 |
|
|
|
1543 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
|
1544 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1545 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
|
1546 |
|
|
|
1547 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
|
1548 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
|
1549 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1550 |
|
|
= round_toward_zero;
|
1551 |
|
|
};
|
1552 |
|
|
#endif
|
1553 |
|
|
|
1554 |
|
|
/// numeric_limits specialization.
|
1555 |
|
|
template<>
|
1556 |
|
|
struct numeric_limits
|
1557 |
|
|
{
|
1558 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1559 |
|
|
|
1560 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1561 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
|
1562 |
|
|
|
1563 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1564 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
|
1565 |
|
|
|
1566 |
|
|
#if __cplusplus >= 201103L
|
1567 |
|
|
static constexpr float
|
1568 |
|
|
lowest() noexcept { return -__FLT_MAX__; }
|
1569 |
|
|
#endif
|
1570 |
|
|
|
1571 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
|
1572 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__;
|
1573 |
|
|
#if __cplusplus >= 201103L
|
1574 |
|
|
static constexpr int max_digits10
|
1575 |
|
|
= __glibcxx_max_digits10 (__FLT_MANT_DIG__);
|
1576 |
|
|
#endif
|
1577 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1578 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
|
1579 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
|
1580 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
|
1581 |
|
|
|
1582 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1583 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; }
|
1584 |
|
|
|
1585 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1586 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; }
|
1587 |
|
|
|
1588 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__;
|
1589 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__;
|
1590 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__;
|
1591 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__;
|
1592 |
|
|
|
1593 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__;
|
1594 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
|
1595 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
|
1596 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1597 |
|
|
= bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
|
1598 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
|
1599 |
|
|
= __glibcxx_float_has_denorm_loss;
|
1600 |
|
|
|
1601 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1602 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); }
|
1603 |
|
|
|
1604 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1605 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); }
|
1606 |
|
|
|
1607 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1608 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); }
|
1609 |
|
|
|
1610 |
|
|
static _GLIBCXX_CONSTEXPR float
|
1611 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; }
|
1612 |
|
|
|
1613 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559
|
1614 |
|
|
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
|
1615 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1616 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1617 |
|
|
|
1618 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps;
|
1619 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
|
1620 |
|
|
= __glibcxx_float_tinyness_before;
|
1621 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1622 |
|
|
= round_to_nearest;
|
1623 |
|
|
};
|
1624 |
|
|
|
1625 |
|
|
#undef __glibcxx_float_has_denorm_loss
|
1626 |
|
|
#undef __glibcxx_float_traps
|
1627 |
|
|
#undef __glibcxx_float_tinyness_before
|
1628 |
|
|
|
1629 |
|
|
/// numeric_limits specialization.
|
1630 |
|
|
template<>
|
1631 |
|
|
struct numeric_limits
|
1632 |
|
|
{
|
1633 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1634 |
|
|
|
1635 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1636 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
|
1637 |
|
|
|
1638 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1639 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
|
1640 |
|
|
|
1641 |
|
|
#if __cplusplus >= 201103L
|
1642 |
|
|
static constexpr double
|
1643 |
|
|
lowest() noexcept { return -__DBL_MAX__; }
|
1644 |
|
|
#endif
|
1645 |
|
|
|
1646 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
|
1647 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__;
|
1648 |
|
|
#if __cplusplus >= 201103L
|
1649 |
|
|
static constexpr int max_digits10
|
1650 |
|
|
= __glibcxx_max_digits10 (__DBL_MANT_DIG__);
|
1651 |
|
|
#endif
|
1652 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1653 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
|
1654 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
|
1655 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
|
1656 |
|
|
|
1657 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1658 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; }
|
1659 |
|
|
|
1660 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1661 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; }
|
1662 |
|
|
|
1663 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__;
|
1664 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__;
|
1665 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__;
|
1666 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__;
|
1667 |
|
|
|
1668 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__;
|
1669 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
|
1670 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
|
1671 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1672 |
|
|
= bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
|
1673 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
|
1674 |
|
|
= __glibcxx_double_has_denorm_loss;
|
1675 |
|
|
|
1676 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1677 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); }
|
1678 |
|
|
|
1679 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1680 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); }
|
1681 |
|
|
|
1682 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1683 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); }
|
1684 |
|
|
|
1685 |
|
|
static _GLIBCXX_CONSTEXPR double
|
1686 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; }
|
1687 |
|
|
|
1688 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559
|
1689 |
|
|
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
|
1690 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1691 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1692 |
|
|
|
1693 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps;
|
1694 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
|
1695 |
|
|
= __glibcxx_double_tinyness_before;
|
1696 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
|
1697 |
|
|
= round_to_nearest;
|
1698 |
|
|
};
|
1699 |
|
|
|
1700 |
|
|
#undef __glibcxx_double_has_denorm_loss
|
1701 |
|
|
#undef __glibcxx_double_traps
|
1702 |
|
|
#undef __glibcxx_double_tinyness_before
|
1703 |
|
|
|
1704 |
|
|
/// numeric_limits specialization.
|
1705 |
|
|
template<>
|
1706 |
|
|
struct numeric_limits
|
1707 |
|
|
{
|
1708 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
|
1709 |
|
|
|
1710 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1711 |
|
|
min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
|
1712 |
|
|
|
1713 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1714 |
|
|
max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
|
1715 |
|
|
|
1716 |
|
|
#if __cplusplus >= 201103L
|
1717 |
|
|
static constexpr long double
|
1718 |
|
|
lowest() noexcept { return -__LDBL_MAX__; }
|
1719 |
|
|
#endif
|
1720 |
|
|
|
1721 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
|
1722 |
|
|
static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__;
|
1723 |
|
|
#if __cplusplus >= 201103L
|
1724 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_digits10
|
1725 |
|
|
= __glibcxx_max_digits10 (__LDBL_MANT_DIG__);
|
1726 |
|
|
#endif
|
1727 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
|
1728 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
|
1729 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
|
1730 |
|
|
static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
|
1731 |
|
|
|
1732 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1733 |
|
|
epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; }
|
1734 |
|
|
|
1735 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1736 |
|
|
round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; }
|
1737 |
|
|
|
1738 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__;
|
1739 |
|
|
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__;
|
1740 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__;
|
1741 |
|
|
static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__;
|
1742 |
|
|
|
1743 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__;
|
1744 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
|
1745 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
|
1746 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
|
1747 |
|
|
= bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
|
1748 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
|
1749 |
|
|
= __glibcxx_long_double_has_denorm_loss;
|
1750 |
|
|
|
1751 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1752 |
|
|
infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); }
|
1753 |
|
|
|
1754 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1755 |
|
|
quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); }
|
1756 |
|
|
|
1757 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1758 |
|
|
signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); }
|
1759 |
|
|
|
1760 |
|
|
static _GLIBCXX_CONSTEXPR long double
|
1761 |
|
|
denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; }
|
1762 |
|
|
|
1763 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_iec559
|
1764 |
|
|
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
|
1765 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
|
1766 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
|
1767 |
|
|
|
1768 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps;
|
1769 |
|
|
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before =
|
1770 |
|
|
__glibcxx_long_double_tinyness_before;
|
1771 |
|
|
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
|
1772 |
|
|
round_to_nearest;
|
1773 |
|
|
};
|
1774 |
|
|
|
1775 |
|
|
#undef __glibcxx_long_double_has_denorm_loss
|
1776 |
|
|
#undef __glibcxx_long_double_traps
|
1777 |
|
|
#undef __glibcxx_long_double_tinyness_before
|
1778 |
|
|
|
1779 |
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
1780 |
|
|
} // namespace
|
1781 |
|
|
|
1782 |
|
|
#undef __glibcxx_signed
|
1783 |
|
|
#undef __glibcxx_min
|
1784 |
|
|
#undef __glibcxx_max
|
1785 |
|
|
#undef __glibcxx_digits
|
1786 |
|
|
#undef __glibcxx_digits10
|
1787 |
|
|
#undef __glibcxx_max_digits10
|
1788 |
|
|
|
1789 |
|
|
#endif // _GLIBCXX_NUMERIC_LIMITS
|