Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef _GLIBCXX_NUMERIC_LIMITS
00039 #define _GLIBCXX_NUMERIC_LIMITS 1
00040
00041 #pragma GCC system_header
00042
00043 #include <bits/c++config.h>
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #ifndef __glibcxx_integral_traps
00081 # define __glibcxx_integral_traps true
00082 #endif
00083
00084
00085
00086
00087
00088
00089 #ifndef __glibcxx_float_has_denorm_loss
00090 # define __glibcxx_float_has_denorm_loss false
00091 #endif
00092 #ifndef __glibcxx_float_traps
00093 # define __glibcxx_float_traps false
00094 #endif
00095 #ifndef __glibcxx_float_tinyness_before
00096 # define __glibcxx_float_tinyness_before false
00097 #endif
00098
00099
00100
00101
00102
00103 #ifndef __glibcxx_double_has_denorm_loss
00104 # define __glibcxx_double_has_denorm_loss false
00105 #endif
00106 #ifndef __glibcxx_double_traps
00107 # define __glibcxx_double_traps false
00108 #endif
00109 #ifndef __glibcxx_double_tinyness_before
00110 # define __glibcxx_double_tinyness_before false
00111 #endif
00112
00113
00114
00115
00116
00117 #ifndef __glibcxx_long_double_has_denorm_loss
00118 # define __glibcxx_long_double_has_denorm_loss false
00119 #endif
00120 #ifndef __glibcxx_long_double_traps
00121 # define __glibcxx_long_double_traps false
00122 #endif
00123 #ifndef __glibcxx_long_double_tinyness_before
00124 # define __glibcxx_long_double_tinyness_before false
00125 #endif
00126
00127
00128
00129 #define __glibcxx_signed(T) ((T)(-1) < 0)
00130
00131 #define __glibcxx_min(T) \
00132 (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0)
00133
00134 #define __glibcxx_max(T) \
00135 (__glibcxx_signed (T) ? \
00136 (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
00137
00138 #define __glibcxx_digits(T) \
00139 (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
00140
00141
00142 #define __glibcxx_digits10(T) \
00143 (__glibcxx_digits (T) * 643L / 2136)
00144
00145 #define __glibcxx_max_digits10(T) \
00146 (2 + (T) * 643L / 2136)
00147
00148 namespace std _GLIBCXX_VISIBILITY(default)
00149 {
00150 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00151
00152
00153
00154
00155
00156
00157 enum float_round_style
00158 {
00159 round_indeterminate = -1,
00160 round_toward_zero = 0,
00161 round_to_nearest = 1,
00162 round_toward_infinity = 2,
00163 round_toward_neg_infinity = 3
00164 };
00165
00166
00167
00168
00169
00170
00171
00172 enum float_denorm_style
00173 {
00174
00175 denorm_indeterminate = -1,
00176
00177 denorm_absent = 0,
00178
00179 denorm_present = 1
00180 };
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192 struct __numeric_limits_base
00193 {
00194
00195
00196 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = false;
00197
00198
00199
00200
00201 static _GLIBCXX_USE_CONSTEXPR int digits = 0;
00202
00203
00204 static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
00205
00206 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00207
00208
00209 static constexpr int max_digits10 = 0;
00210 #endif
00211
00212
00213 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
00214
00215
00216
00217 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
00218
00219
00220
00221
00222
00223 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
00224
00225
00226
00227 static _GLIBCXX_USE_CONSTEXPR int radix = 0;
00228
00229
00230
00231 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00232
00233
00234
00235 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00236
00237
00238
00239
00240 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00241
00242
00243
00244 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00245
00246
00247 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00248
00249
00250
00251 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00252
00253
00254
00255 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00256
00257
00258 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
00259
00260
00261
00262 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00263
00264
00265
00266 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00267
00268
00269
00270
00271 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = false;
00272
00273
00274
00275
00276
00277 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
00278
00279
00280 static _GLIBCXX_USE_CONSTEXPR bool traps = false;
00281
00282
00283 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00284
00285
00286
00287
00288 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
00289 round_toward_zero;
00290 };
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303 template<typename _Tp>
00304 struct numeric_limits : public __numeric_limits_base
00305 {
00306
00307
00308 static _GLIBCXX_CONSTEXPR _Tp
00309 min() throw() { return static_cast<_Tp>(0); }
00310
00311
00312 static _GLIBCXX_CONSTEXPR _Tp
00313 max() throw() { return static_cast<_Tp>(0); }
00314
00315 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00316
00317
00318 static constexpr _Tp
00319 lowest() throw() { return static_cast<_Tp>(0); }
00320 #endif
00321
00322
00323
00324 static _GLIBCXX_CONSTEXPR _Tp
00325 epsilon() throw() { return static_cast<_Tp>(0); }
00326
00327
00328 static _GLIBCXX_CONSTEXPR _Tp
00329 round_error() throw() { return static_cast<_Tp>(0); }
00330
00331
00332 static _GLIBCXX_CONSTEXPR _Tp
00333 infinity() throw() { return static_cast<_Tp>(0); }
00334
00335
00336
00337 static _GLIBCXX_CONSTEXPR _Tp
00338 quiet_NaN() throw() { return static_cast<_Tp>(0); }
00339
00340
00341
00342 static _GLIBCXX_CONSTEXPR _Tp
00343 signaling_NaN() throw() { return static_cast<_Tp>(0); }
00344
00345
00346
00347
00348 static _GLIBCXX_CONSTEXPR _Tp
00349 denorm_min() throw() { return static_cast<_Tp>(0); }
00350 };
00351
00352 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00353 template<typename _Tp>
00354 struct numeric_limits<const _Tp>
00355 : public numeric_limits<_Tp> { };
00356
00357 template<typename _Tp>
00358 struct numeric_limits<volatile _Tp>
00359 : public numeric_limits<_Tp> { };
00360
00361 template<typename _Tp>
00362 struct numeric_limits<const volatile _Tp>
00363 : public numeric_limits<_Tp> { };
00364 #endif
00365
00366
00367
00368
00369
00370 template<>
00371 struct numeric_limits<bool>
00372 {
00373 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00374
00375 static _GLIBCXX_CONSTEXPR bool
00376 min() throw() { return false; }
00377
00378 static _GLIBCXX_CONSTEXPR bool
00379 max() throw() { return true; }
00380
00381 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00382 static constexpr bool
00383 lowest() throw() { return min(); }
00384 #endif
00385 static _GLIBCXX_USE_CONSTEXPR int digits = 1;
00386 static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
00387 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00388 static constexpr int max_digits10 = 0;
00389 #endif
00390 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
00391 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00392 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00393 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00394
00395 static _GLIBCXX_CONSTEXPR bool
00396 epsilon() throw() { return false; }
00397
00398 static _GLIBCXX_CONSTEXPR bool
00399 round_error() throw() { return false; }
00400
00401 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00402 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00403 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00404 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00405
00406 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00407 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00408 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00409 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00410 = denorm_absent;
00411 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00412
00413 static _GLIBCXX_CONSTEXPR bool
00414 infinity() throw() { return false; }
00415
00416 static _GLIBCXX_CONSTEXPR bool
00417 quiet_NaN() throw() { return false; }
00418
00419 static _GLIBCXX_CONSTEXPR bool
00420 signaling_NaN() throw() { return false; }
00421
00422 static _GLIBCXX_CONSTEXPR bool
00423 denorm_min() throw() { return false; }
00424
00425 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00426 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00427 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
00428
00429
00430
00431
00432 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00433 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00434 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00435 = round_toward_zero;
00436 };
00437
00438
00439 template<>
00440 struct numeric_limits<char>
00441 {
00442 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00443
00444 static _GLIBCXX_CONSTEXPR char
00445 min() throw() { return __glibcxx_min(char); }
00446
00447 static _GLIBCXX_CONSTEXPR char
00448 max() throw() { return __glibcxx_max(char); }
00449
00450 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00451 static constexpr char
00452 lowest() throw() { return min(); }
00453 #endif
00454
00455 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
00456 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char);
00457 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00458 static constexpr int max_digits10 = 0;
00459 #endif
00460 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char);
00461 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00462 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00463 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00464
00465 static _GLIBCXX_CONSTEXPR char
00466 epsilon() throw() { return 0; }
00467
00468 static _GLIBCXX_CONSTEXPR char
00469 round_error() throw() { return 0; }
00470
00471 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00472 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00473 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00474 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00475
00476 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00477 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00478 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00479 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00480 = denorm_absent;
00481 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00482
00483 static _GLIBCXX_CONSTEXPR
00484 char infinity() throw() { return char(); }
00485
00486 static _GLIBCXX_CONSTEXPR char
00487 quiet_NaN() throw() { return char(); }
00488
00489 static _GLIBCXX_CONSTEXPR char
00490 signaling_NaN() throw() { return char(); }
00491
00492 static _GLIBCXX_CONSTEXPR char
00493 denorm_min() throw() { return static_cast<char>(0); }
00494
00495 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00496 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00497 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00498
00499 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00500 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00501 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00502 = round_toward_zero;
00503 };
00504
00505
00506 template<>
00507 struct numeric_limits<signed char>
00508 {
00509 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00510
00511 static _GLIBCXX_CONSTEXPR signed char
00512 min() throw() { return -__SCHAR_MAX__ - 1; }
00513
00514 static _GLIBCXX_CONSTEXPR signed char
00515 max() throw() { return __SCHAR_MAX__; }
00516
00517 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00518 static constexpr signed char
00519 lowest() throw() { return min(); }
00520 #endif
00521
00522 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
00523 static _GLIBCXX_USE_CONSTEXPR int digits10
00524 = __glibcxx_digits10 (signed char);
00525 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00526 static constexpr int max_digits10 = 0;
00527 #endif
00528 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
00529 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00530 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00531 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00532
00533 static _GLIBCXX_CONSTEXPR signed char
00534 epsilon() throw() { return 0; }
00535
00536 static _GLIBCXX_CONSTEXPR signed char
00537 round_error() throw() { return 0; }
00538
00539 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00540 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00541 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00542 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00543
00544 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00545 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00546 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00547 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00548 = denorm_absent;
00549 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00550
00551 static _GLIBCXX_CONSTEXPR signed char
00552 infinity() throw() { return static_cast<signed char>(0); }
00553
00554 static _GLIBCXX_CONSTEXPR signed char
00555 quiet_NaN() throw() { return static_cast<signed char>(0); }
00556
00557 static _GLIBCXX_CONSTEXPR signed char
00558 signaling_NaN() throw() { return static_cast<signed char>(0); }
00559
00560 static _GLIBCXX_CONSTEXPR signed char
00561 denorm_min() throw() { return static_cast<signed char>(0); }
00562
00563 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00564 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00565 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00566
00567 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00568 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00569 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00570 = round_toward_zero;
00571 };
00572
00573
00574 template<>
00575 struct numeric_limits<unsigned char>
00576 {
00577 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00578
00579 static _GLIBCXX_CONSTEXPR unsigned char
00580 min() throw() { return 0; }
00581
00582 static _GLIBCXX_CONSTEXPR unsigned char
00583 max() throw() { return __SCHAR_MAX__ * 2U + 1; }
00584
00585 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00586 static constexpr unsigned char
00587 lowest() throw() { return min(); }
00588 #endif
00589
00590 static _GLIBCXX_USE_CONSTEXPR int digits
00591 = __glibcxx_digits (unsigned char);
00592 static _GLIBCXX_USE_CONSTEXPR int digits10
00593 = __glibcxx_digits10 (unsigned char);
00594 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00595 static constexpr int max_digits10 = 0;
00596 #endif
00597 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
00598 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00599 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00600 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00601
00602 static _GLIBCXX_CONSTEXPR unsigned char
00603 epsilon() throw() { return 0; }
00604
00605 static _GLIBCXX_CONSTEXPR unsigned char
00606 round_error() throw() { return 0; }
00607
00608 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00609 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00610 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00611 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00612
00613 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00614 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00615 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00616 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00617 = denorm_absent;
00618 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00619
00620 static _GLIBCXX_CONSTEXPR unsigned char
00621 infinity() throw() { return static_cast<unsigned char>(0); }
00622
00623 static _GLIBCXX_CONSTEXPR unsigned char
00624 quiet_NaN() throw() { return static_cast<unsigned char>(0); }
00625
00626 static _GLIBCXX_CONSTEXPR unsigned char
00627 signaling_NaN() throw() { return static_cast<unsigned char>(0); }
00628
00629 static _GLIBCXX_CONSTEXPR unsigned char
00630 denorm_min() throw() { return static_cast<unsigned char>(0); }
00631
00632 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00633 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00634 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00635
00636 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00637 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00638 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00639 = round_toward_zero;
00640 };
00641
00642
00643 template<>
00644 struct numeric_limits<wchar_t>
00645 {
00646 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00647
00648 static _GLIBCXX_CONSTEXPR wchar_t
00649 min() throw() { return __glibcxx_min (wchar_t); }
00650
00651 static _GLIBCXX_CONSTEXPR wchar_t
00652 max() throw() { return __glibcxx_max (wchar_t); }
00653
00654 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00655 static constexpr wchar_t
00656 lowest() throw() { return min(); }
00657 #endif
00658
00659 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
00660 static _GLIBCXX_USE_CONSTEXPR int digits10
00661 = __glibcxx_digits10 (wchar_t);
00662 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00663 static constexpr int max_digits10 = 0;
00664 #endif
00665 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t);
00666 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00667 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00668 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00669
00670 static _GLIBCXX_CONSTEXPR wchar_t
00671 epsilon() throw() { return 0; }
00672
00673 static _GLIBCXX_CONSTEXPR wchar_t
00674 round_error() throw() { return 0; }
00675
00676 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00677 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00678 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00679 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00680
00681 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00682 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00683 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00684 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00685 = denorm_absent;
00686 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00687
00688 static _GLIBCXX_CONSTEXPR wchar_t
00689 infinity() throw() { return wchar_t(); }
00690
00691 static _GLIBCXX_CONSTEXPR wchar_t
00692 quiet_NaN() throw() { return wchar_t(); }
00693
00694 static _GLIBCXX_CONSTEXPR wchar_t
00695 signaling_NaN() throw() { return wchar_t(); }
00696
00697 static _GLIBCXX_CONSTEXPR wchar_t
00698 denorm_min() throw() { return wchar_t(); }
00699
00700 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00701 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00702 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00703
00704 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00705 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00706 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00707 = round_toward_zero;
00708 };
00709
00710 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00711
00712 template<>
00713 struct numeric_limits<char16_t>
00714 {
00715 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00716
00717 static _GLIBCXX_CONSTEXPR char16_t
00718 min() throw() { return __glibcxx_min (char16_t); }
00719
00720 static _GLIBCXX_CONSTEXPR char16_t
00721 max() throw() { return __glibcxx_max (char16_t); }
00722
00723 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00724 static constexpr char16_t
00725 lowest() throw() { return min(); }
00726 #endif
00727
00728 static _GLIBCXX_USE_CONSTEXPR int digits
00729 = __glibcxx_digits (char16_t);
00730 static _GLIBCXX_USE_CONSTEXPR int digits10
00731 = __glibcxx_digits10 (char16_t);
00732 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00733 static constexpr int max_digits10 = 0;
00734 #endif
00735 static _GLIBCXX_USE_CONSTEXPR bool is_signed
00736 = __glibcxx_signed (char16_t);
00737 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00738 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00739 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00740
00741 static _GLIBCXX_CONSTEXPR char16_t
00742 epsilon() throw() { return 0; }
00743
00744 static _GLIBCXX_CONSTEXPR char16_t
00745 round_error() throw() { return 0; }
00746
00747 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00748 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00749 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00750 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00751
00752 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00753 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00754 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00755 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00756 = denorm_absent;
00757 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00758
00759 static _GLIBCXX_CONSTEXPR char16_t
00760 infinity() throw() { return char16_t(); }
00761
00762 static _GLIBCXX_CONSTEXPR char16_t
00763 quiet_NaN() throw() { return char16_t(); }
00764
00765 static _GLIBCXX_CONSTEXPR char16_t
00766 signaling_NaN() throw() { return char16_t(); }
00767
00768 static _GLIBCXX_CONSTEXPR char16_t
00769 denorm_min() throw() { return char16_t(); }
00770
00771 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00772 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00773 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00774
00775 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00776 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00777 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00778 = round_toward_zero;
00779 };
00780
00781
00782 template<>
00783 struct numeric_limits<char32_t>
00784 {
00785 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00786
00787 static _GLIBCXX_CONSTEXPR char32_t
00788 min() throw() { return __glibcxx_min (char32_t); }
00789
00790 static _GLIBCXX_CONSTEXPR char32_t
00791 max() throw() { return __glibcxx_max (char32_t); }
00792
00793 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00794 static constexpr char32_t
00795 lowest() throw() { return min(); }
00796 #endif
00797
00798 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char32_t);
00799 static _GLIBCXX_USE_CONSTEXPR int digits10
00800 = __glibcxx_digits10 (char32_t);
00801 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00802 static constexpr int max_digits10 = 0;
00803 #endif
00804 static _GLIBCXX_USE_CONSTEXPR bool is_signed
00805 = __glibcxx_signed (char32_t);
00806 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00807 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00808 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00809
00810 static _GLIBCXX_CONSTEXPR char32_t
00811 epsilon() throw() { return 0; }
00812
00813 static _GLIBCXX_CONSTEXPR char32_t
00814 round_error() throw() { return 0; }
00815
00816 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00817 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00818 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00819 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00820
00821 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00822 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00823 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00824 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00825 = denorm_absent;
00826 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00827
00828 static _GLIBCXX_CONSTEXPR char32_t
00829 infinity() throw() { return char32_t(); }
00830
00831 static _GLIBCXX_CONSTEXPR char32_t
00832 quiet_NaN() throw() { return char32_t(); }
00833
00834 static _GLIBCXX_CONSTEXPR char32_t
00835 signaling_NaN() throw() { return char32_t(); }
00836
00837 static _GLIBCXX_CONSTEXPR char32_t
00838 denorm_min() throw() { return char32_t(); }
00839
00840 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00841 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00842 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00843
00844 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00845 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00846 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00847 = round_toward_zero;
00848 };
00849 #endif
00850
00851
00852 template<>
00853 struct numeric_limits<short>
00854 {
00855 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00856
00857 static _GLIBCXX_CONSTEXPR short
00858 min() throw() { return -__SHRT_MAX__ - 1; }
00859
00860 static _GLIBCXX_CONSTEXPR short
00861 max() throw() { return __SHRT_MAX__; }
00862
00863 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00864 static constexpr short
00865 lowest() throw() { return min(); }
00866 #endif
00867
00868 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
00869 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short);
00870 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00871 static constexpr int max_digits10 = 0;
00872 #endif
00873 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
00874 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00875 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00876 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00877
00878 static _GLIBCXX_CONSTEXPR short
00879 epsilon() throw() { return 0; }
00880
00881 static _GLIBCXX_CONSTEXPR short
00882 round_error() throw() { return 0; }
00883
00884 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00885 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00886 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00887 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00888
00889 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00890 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00891 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00892 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00893 = denorm_absent;
00894 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00895
00896 static _GLIBCXX_CONSTEXPR short
00897 infinity() throw() { return short(); }
00898
00899 static _GLIBCXX_CONSTEXPR short
00900 quiet_NaN() throw() { return short(); }
00901
00902 static _GLIBCXX_CONSTEXPR short
00903 signaling_NaN() throw() { return short(); }
00904
00905 static _GLIBCXX_CONSTEXPR short
00906 denorm_min() throw() { return short(); }
00907
00908 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00909 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00910 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00911
00912 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00913 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00914 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00915 = round_toward_zero;
00916 };
00917
00918
00919 template<>
00920 struct numeric_limits<unsigned short>
00921 {
00922 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00923
00924 static _GLIBCXX_CONSTEXPR unsigned short
00925 min() throw() { return 0; }
00926
00927 static _GLIBCXX_CONSTEXPR unsigned short
00928 max() throw() { return __SHRT_MAX__ * 2U + 1; }
00929
00930 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00931 static constexpr unsigned short
00932 lowest() throw() { return min(); }
00933 #endif
00934
00935 static _GLIBCXX_USE_CONSTEXPR int digits
00936 = __glibcxx_digits (unsigned short);
00937 static _GLIBCXX_USE_CONSTEXPR int digits10
00938 = __glibcxx_digits10 (unsigned short);
00939 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00940 static constexpr int max_digits10 = 0;
00941 #endif
00942 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
00943 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
00944 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
00945 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
00946
00947 static _GLIBCXX_CONSTEXPR unsigned short
00948 epsilon() throw() { return 0; }
00949
00950 static _GLIBCXX_CONSTEXPR unsigned short
00951 round_error() throw() { return 0; }
00952
00953 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
00954 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
00955 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
00956 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
00957
00958 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
00959 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
00960 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
00961 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
00962 = denorm_absent;
00963 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
00964
00965 static _GLIBCXX_CONSTEXPR unsigned short
00966 infinity() throw() { return static_cast<unsigned short>(0); }
00967
00968 static _GLIBCXX_CONSTEXPR unsigned short
00969 quiet_NaN() throw() { return static_cast<unsigned short>(0); }
00970
00971 static _GLIBCXX_CONSTEXPR unsigned short
00972 signaling_NaN() throw() { return static_cast<unsigned short>(0); }
00973
00974 static _GLIBCXX_CONSTEXPR unsigned short
00975 denorm_min() throw() { return static_cast<unsigned short>(0); }
00976
00977 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
00978 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
00979 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
00980
00981 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
00982 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
00983 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
00984 = round_toward_zero;
00985 };
00986
00987
00988 template<>
00989 struct numeric_limits<int>
00990 {
00991 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
00992
00993 static _GLIBCXX_CONSTEXPR int
00994 min() throw() { return -__INT_MAX__ - 1; }
00995
00996 static _GLIBCXX_CONSTEXPR int
00997 max() throw() { return __INT_MAX__; }
00998
00999 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01000 static constexpr int
01001 lowest() throw() { return min(); }
01002 #endif
01003
01004 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
01005 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int);
01006 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01007 static constexpr int max_digits10 = 0;
01008 #endif
01009 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
01010 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
01011 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
01012 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
01013
01014 static _GLIBCXX_CONSTEXPR int
01015 epsilon() throw() { return 0; }
01016
01017 static _GLIBCXX_CONSTEXPR int
01018 round_error() throw() { return 0; }
01019
01020 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
01021 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
01022 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
01023 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
01024
01025 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
01026 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
01027 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
01028 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01029 = denorm_absent;
01030 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
01031
01032 static _GLIBCXX_CONSTEXPR int
01033 infinity() throw() { return static_cast<int>(0); }
01034
01035 static _GLIBCXX_CONSTEXPR int
01036 quiet_NaN() throw() { return static_cast<int>(0); }
01037
01038 static _GLIBCXX_CONSTEXPR int
01039 signaling_NaN() throw() { return static_cast<int>(0); }
01040
01041 static _GLIBCXX_CONSTEXPR int
01042 denorm_min() throw() { return static_cast<int>(0); }
01043
01044 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
01045 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01046 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
01047
01048 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
01049 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
01050 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01051 = round_toward_zero;
01052 };
01053
01054
01055 template<>
01056 struct numeric_limits<unsigned int>
01057 {
01058 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01059
01060 static _GLIBCXX_CONSTEXPR unsigned int
01061 min() throw() { return 0; }
01062
01063 static _GLIBCXX_CONSTEXPR unsigned int
01064 max() throw() { return __INT_MAX__ * 2U + 1; }
01065
01066 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01067 static constexpr unsigned int
01068 lowest() throw() { return min(); }
01069 #endif
01070
01071 static _GLIBCXX_USE_CONSTEXPR int digits
01072 = __glibcxx_digits (unsigned int);
01073 static _GLIBCXX_USE_CONSTEXPR int digits10
01074 = __glibcxx_digits10 (unsigned int);
01075 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01076 static constexpr int max_digits10 = 0;
01077 #endif
01078 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
01079 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
01080 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
01081 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
01082
01083 static _GLIBCXX_CONSTEXPR unsigned int
01084 epsilon() throw() { return 0; }
01085
01086 static _GLIBCXX_CONSTEXPR unsigned int
01087 round_error() throw() { return 0; }
01088
01089 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
01090 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
01091 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
01092 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
01093
01094 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
01095 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
01096 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
01097 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01098 = denorm_absent;
01099 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
01100
01101 static _GLIBCXX_CONSTEXPR unsigned int
01102 infinity() throw() { return static_cast<unsigned int>(0); }
01103
01104 static _GLIBCXX_CONSTEXPR unsigned int
01105 quiet_NaN() throw() { return static_cast<unsigned int>(0); }
01106
01107 static _GLIBCXX_CONSTEXPR unsigned int
01108 signaling_NaN() throw() { return static_cast<unsigned int>(0); }
01109
01110 static _GLIBCXX_CONSTEXPR unsigned int
01111 denorm_min() throw() { return static_cast<unsigned int>(0); }
01112
01113 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
01114 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01115 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
01116
01117 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
01118 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
01119 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01120 = round_toward_zero;
01121 };
01122
01123
01124 template<>
01125 struct numeric_limits<long>
01126 {
01127 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01128
01129 static _GLIBCXX_CONSTEXPR long
01130 min() throw() { return -__LONG_MAX__ - 1; }
01131
01132 static _GLIBCXX_CONSTEXPR long
01133 max() throw() { return __LONG_MAX__; }
01134
01135 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01136 static constexpr long
01137 lowest() throw() { return min(); }
01138 #endif
01139
01140 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
01141 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long);
01142 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01143 static constexpr int max_digits10 = 0;
01144 #endif
01145 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
01146 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
01147 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
01148 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
01149
01150 static _GLIBCXX_CONSTEXPR long
01151 epsilon() throw() { return 0; }
01152
01153 static _GLIBCXX_CONSTEXPR long
01154 round_error() throw() { return 0; }
01155
01156 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
01157 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
01158 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
01159 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
01160
01161 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
01162 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
01163 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
01164 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01165 = denorm_absent;
01166 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
01167
01168 static _GLIBCXX_CONSTEXPR long
01169 infinity() throw() { return static_cast<long>(0); }
01170
01171 static _GLIBCXX_CONSTEXPR long
01172 quiet_NaN() throw() { return static_cast<long>(0); }
01173
01174 static _GLIBCXX_CONSTEXPR long
01175 signaling_NaN() throw() { return static_cast<long>(0); }
01176
01177 static _GLIBCXX_CONSTEXPR long
01178 denorm_min() throw() { return static_cast<long>(0); }
01179
01180 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
01181 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01182 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
01183
01184 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
01185 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
01186 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01187 = round_toward_zero;
01188 };
01189
01190
01191 template<>
01192 struct numeric_limits<unsigned long>
01193 {
01194 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01195
01196 static _GLIBCXX_CONSTEXPR unsigned long
01197 min() throw() { return 0; }
01198
01199 static _GLIBCXX_CONSTEXPR unsigned long
01200 max() throw() { return __LONG_MAX__ * 2UL + 1; }
01201
01202 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01203 static constexpr unsigned long
01204 lowest() throw() { return min(); }
01205 #endif
01206
01207 static _GLIBCXX_USE_CONSTEXPR int digits
01208 = __glibcxx_digits (unsigned long);
01209 static _GLIBCXX_USE_CONSTEXPR int digits10
01210 = __glibcxx_digits10 (unsigned long);
01211 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01212 static constexpr int max_digits10 = 0;
01213 #endif
01214 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
01215 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
01216 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
01217 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
01218
01219 static _GLIBCXX_CONSTEXPR unsigned long
01220 epsilon() throw() { return 0; }
01221
01222 static _GLIBCXX_CONSTEXPR unsigned long
01223 round_error() throw() { return 0; }
01224
01225 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
01226 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
01227 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
01228 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
01229
01230 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
01231 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
01232 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
01233 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01234 = denorm_absent;
01235 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
01236
01237 static _GLIBCXX_CONSTEXPR unsigned long
01238 infinity() throw() { return static_cast<unsigned long>(0); }
01239
01240 static _GLIBCXX_CONSTEXPR unsigned long
01241 quiet_NaN() throw() { return static_cast<unsigned long>(0); }
01242
01243 static _GLIBCXX_CONSTEXPR unsigned long
01244 signaling_NaN() throw() { return static_cast<unsigned long>(0); }
01245
01246 static _GLIBCXX_CONSTEXPR unsigned long
01247 denorm_min() throw() { return static_cast<unsigned long>(0); }
01248
01249 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
01250 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01251 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
01252
01253 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
01254 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
01255 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01256 = round_toward_zero;
01257 };
01258
01259
01260 template<>
01261 struct numeric_limits<long long>
01262 {
01263 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01264
01265 static _GLIBCXX_CONSTEXPR long long
01266 min() throw() { return -__LONG_LONG_MAX__ - 1; }
01267
01268 static _GLIBCXX_CONSTEXPR long long
01269 max() throw() { return __LONG_LONG_MAX__; }
01270
01271 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01272 static constexpr long long
01273 lowest() throw() { return min(); }
01274 #endif
01275
01276 static _GLIBCXX_USE_CONSTEXPR int digits
01277 = __glibcxx_digits (long long);
01278 static _GLIBCXX_USE_CONSTEXPR int digits10
01279 = __glibcxx_digits10 (long long);
01280 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01281 static constexpr int max_digits10 = 0;
01282 #endif
01283 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
01284 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
01285 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
01286 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
01287
01288 static _GLIBCXX_CONSTEXPR long long
01289 epsilon() throw() { return 0; }
01290
01291 static _GLIBCXX_CONSTEXPR long long
01292 round_error() throw() { return 0; }
01293
01294 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
01295 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
01296 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
01297 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
01298
01299 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
01300 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
01301 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
01302 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01303 = denorm_absent;
01304 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
01305
01306 static _GLIBCXX_CONSTEXPR long long
01307 infinity() throw() { return static_cast<long long>(0); }
01308
01309 static _GLIBCXX_CONSTEXPR long long
01310 quiet_NaN() throw() { return static_cast<long long>(0); }
01311
01312 static _GLIBCXX_CONSTEXPR long long
01313 signaling_NaN() throw() { return static_cast<long long>(0); }
01314
01315 static _GLIBCXX_CONSTEXPR long long
01316 denorm_min() throw() { return static_cast<long long>(0); }
01317
01318 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
01319 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01320 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
01321
01322 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
01323 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
01324 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01325 = round_toward_zero;
01326 };
01327
01328
01329 template<>
01330 struct numeric_limits<unsigned long long>
01331 {
01332 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01333
01334 static _GLIBCXX_CONSTEXPR unsigned long long
01335 min() throw() { return 0; }
01336
01337 static _GLIBCXX_CONSTEXPR unsigned long long
01338 max() throw() { return __LONG_LONG_MAX__ * 2ULL + 1; }
01339
01340 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01341 static constexpr unsigned long long
01342 lowest() throw() { return min(); }
01343 #endif
01344
01345 static _GLIBCXX_USE_CONSTEXPR int digits
01346 = __glibcxx_digits (unsigned long long);
01347 static _GLIBCXX_USE_CONSTEXPR int digits10
01348 = __glibcxx_digits10 (unsigned long long);
01349 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01350 static constexpr int max_digits10 = 0;
01351 #endif
01352 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
01353 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
01354 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
01355 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
01356
01357 static _GLIBCXX_CONSTEXPR unsigned long long
01358 epsilon() throw() { return 0; }
01359
01360 static _GLIBCXX_CONSTEXPR unsigned long long
01361 round_error() throw() { return 0; }
01362
01363 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
01364 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
01365 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
01366 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
01367
01368 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
01369 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
01370 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
01371 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01372 = denorm_absent;
01373 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
01374
01375 static _GLIBCXX_CONSTEXPR unsigned long long
01376 infinity() throw() { return static_cast<unsigned long long>(0); }
01377
01378 static _GLIBCXX_CONSTEXPR unsigned long long
01379 quiet_NaN() throw() { return static_cast<unsigned long long>(0); }
01380
01381 static _GLIBCXX_CONSTEXPR unsigned long long
01382 signaling_NaN() throw() { return static_cast<unsigned long long>(0); }
01383
01384 static _GLIBCXX_CONSTEXPR unsigned long long
01385 denorm_min() throw() { return static_cast<unsigned long long>(0); }
01386
01387 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
01388 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01389 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
01390
01391 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
01392 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
01393 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01394 = round_toward_zero;
01395 };
01396
01397
01398 template<>
01399 struct numeric_limits<float>
01400 {
01401 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01402
01403 static _GLIBCXX_CONSTEXPR float
01404 min() throw() { return __FLT_MIN__; }
01405
01406 static _GLIBCXX_CONSTEXPR float
01407 max() throw() { return __FLT_MAX__; }
01408
01409 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01410 static constexpr float
01411 lowest() throw() { return -__FLT_MAX__; }
01412 #endif
01413
01414 static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
01415 static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__;
01416 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01417 static constexpr int max_digits10
01418 = __glibcxx_max_digits10 (__FLT_MANT_DIG__);
01419 #endif
01420 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
01421 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
01422 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
01423 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
01424
01425 static _GLIBCXX_CONSTEXPR float
01426 epsilon() throw() { return __FLT_EPSILON__; }
01427
01428 static _GLIBCXX_CONSTEXPR float
01429 round_error() throw() { return 0.5F; }
01430
01431 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__;
01432 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__;
01433 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__;
01434 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__;
01435
01436 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__;
01437 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
01438 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
01439 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01440 = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
01441 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
01442 = __glibcxx_float_has_denorm_loss;
01443
01444 static _GLIBCXX_CONSTEXPR float
01445 infinity() throw() { return __builtin_huge_valf (); }
01446
01447 static _GLIBCXX_CONSTEXPR float
01448 quiet_NaN() throw() { return __builtin_nanf (""); }
01449
01450 static _GLIBCXX_CONSTEXPR float
01451 signaling_NaN() throw() { return __builtin_nansf (""); }
01452
01453 static _GLIBCXX_CONSTEXPR float
01454 denorm_min() throw() { return __FLT_DENORM_MIN__; }
01455
01456 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
01457 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
01458 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01459 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
01460
01461 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps;
01462 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
01463 = __glibcxx_float_tinyness_before;
01464 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01465 = round_to_nearest;
01466 };
01467
01468 #undef __glibcxx_float_has_denorm_loss
01469 #undef __glibcxx_float_traps
01470 #undef __glibcxx_float_tinyness_before
01471
01472
01473 template<>
01474 struct numeric_limits<double>
01475 {
01476 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01477
01478 static _GLIBCXX_CONSTEXPR double
01479 min() throw() { return __DBL_MIN__; }
01480
01481 static _GLIBCXX_CONSTEXPR double
01482 max() throw() { return __DBL_MAX__; }
01483
01484 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01485 static constexpr double
01486 lowest() throw() { return -__DBL_MAX__; }
01487 #endif
01488
01489 static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
01490 static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__;
01491 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01492 static constexpr int max_digits10
01493 = __glibcxx_max_digits10 (__DBL_MANT_DIG__);
01494 #endif
01495 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
01496 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
01497 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
01498 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
01499
01500 static _GLIBCXX_CONSTEXPR double
01501 epsilon() throw() { return __DBL_EPSILON__; }
01502
01503 static _GLIBCXX_CONSTEXPR double
01504 round_error() throw() { return 0.5; }
01505
01506 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__;
01507 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__;
01508 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__;
01509 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__;
01510
01511 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__;
01512 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
01513 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
01514 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01515 = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
01516 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
01517 = __glibcxx_double_has_denorm_loss;
01518
01519 static _GLIBCXX_CONSTEXPR double
01520 infinity() throw() { return __builtin_huge_val(); }
01521
01522 static _GLIBCXX_CONSTEXPR double
01523 quiet_NaN() throw() { return __builtin_nan (""); }
01524
01525 static _GLIBCXX_CONSTEXPR double
01526 signaling_NaN() throw() { return __builtin_nans (""); }
01527
01528 static _GLIBCXX_CONSTEXPR double
01529 denorm_min() throw() { return __DBL_DENORM_MIN__; }
01530
01531 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
01532 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
01533 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01534 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
01535
01536 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps;
01537 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
01538 = __glibcxx_double_tinyness_before;
01539 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
01540 = round_to_nearest;
01541 };
01542
01543 #undef __glibcxx_double_has_denorm_loss
01544 #undef __glibcxx_double_traps
01545 #undef __glibcxx_double_tinyness_before
01546
01547
01548 template<>
01549 struct numeric_limits<long double>
01550 {
01551 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
01552
01553 static _GLIBCXX_CONSTEXPR long double
01554 min() throw() { return __LDBL_MIN__; }
01555
01556 static _GLIBCXX_CONSTEXPR long double
01557 max() throw() { return __LDBL_MAX__; }
01558
01559 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01560 static constexpr long double
01561 lowest() throw() { return -__LDBL_MAX__; }
01562 #endif
01563
01564 static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
01565 static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__;
01566 #ifdef __GXX_EXPERIMENTAL_CXX0X__
01567 static _GLIBCXX_USE_CONSTEXPR int max_digits10
01568 = __glibcxx_max_digits10 (__LDBL_MANT_DIG__);
01569 #endif
01570 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
01571 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
01572 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
01573 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
01574
01575 static _GLIBCXX_CONSTEXPR long double
01576 epsilon() throw() { return __LDBL_EPSILON__; }
01577
01578 static _GLIBCXX_CONSTEXPR long double
01579 round_error() throw() { return 0.5L; }
01580
01581 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__;
01582 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__;
01583 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__;
01584 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__;
01585
01586 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__;
01587 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
01588 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
01589 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
01590 = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
01591 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
01592 = __glibcxx_long_double_has_denorm_loss;
01593
01594 static _GLIBCXX_CONSTEXPR long double
01595 infinity() throw() { return __builtin_huge_vall (); }
01596
01597 static _GLIBCXX_CONSTEXPR long double
01598 quiet_NaN() throw() { return __builtin_nanl (""); }
01599
01600 static _GLIBCXX_CONSTEXPR long double
01601 signaling_NaN() throw() { return __builtin_nansl (""); }
01602
01603 static _GLIBCXX_CONSTEXPR long double
01604 denorm_min() throw() { return __LDBL_DENORM_MIN__; }
01605
01606 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
01607 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
01608 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
01609 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
01610
01611 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps;
01612 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before =
01613 __glibcxx_long_double_tinyness_before;
01614 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
01615 round_to_nearest;
01616 };
01617
01618 #undef __glibcxx_long_double_has_denorm_loss
01619 #undef __glibcxx_long_double_traps
01620 #undef __glibcxx_long_double_tinyness_before
01621
01622 _GLIBCXX_END_NAMESPACE_VERSION
01623 }
01624
01625 #undef __glibcxx_signed
01626 #undef __glibcxx_min
01627 #undef __glibcxx_max
01628 #undef __glibcxx_digits
01629 #undef __glibcxx_digits10
01630 #undef __glibcxx_max_digits10
01631
01632 #endif // _GLIBCXX_NUMERIC_LIMITS