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
00039
00040
00041
00042
00043 #ifndef _GLIBCXX_NUMERIC_LIMITS
00044 #define _GLIBCXX_NUMERIC_LIMITS 1
00045
00046 #pragma GCC system_header
00047
00048 #include <bits/c++config.h>
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
00081
00082
00083
00084
00085 #ifndef __glibcxx_integral_traps
00086 # define __glibcxx_integral_traps true
00087 #endif
00088
00089
00090
00091
00092
00093
00094 #ifndef __glibcxx_float_has_denorm_loss
00095 # define __glibcxx_float_has_denorm_loss false
00096 #endif
00097 #ifndef __glibcxx_float_traps
00098 # define __glibcxx_float_traps false
00099 #endif
00100 #ifndef __glibcxx_float_tinyness_before
00101 # define __glibcxx_float_tinyness_before false
00102 #endif
00103
00104
00105
00106
00107
00108 #ifndef __glibcxx_double_has_denorm_loss
00109 # define __glibcxx_double_has_denorm_loss false
00110 #endif
00111 #ifndef __glibcxx_double_traps
00112 # define __glibcxx_double_traps false
00113 #endif
00114 #ifndef __glibcxx_double_tinyness_before
00115 # define __glibcxx_double_tinyness_before false
00116 #endif
00117
00118
00119
00120
00121
00122 #ifndef __glibcxx_long_double_has_denorm_loss
00123 # define __glibcxx_long_double_has_denorm_loss false
00124 #endif
00125 #ifndef __glibcxx_long_double_traps
00126 # define __glibcxx_long_double_traps false
00127 #endif
00128 #ifndef __glibcxx_long_double_tinyness_before
00129 # define __glibcxx_long_double_tinyness_before false
00130 #endif
00131
00132
00133
00134 #define __glibcxx_signed(T) ((T)(-1) < 0)
00135
00136 #define __glibcxx_min(T) \
00137 (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0)
00138
00139 #define __glibcxx_max(T) \
00140 (__glibcxx_signed (T) ? \
00141 (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
00142
00143 #define __glibcxx_digits(T) \
00144 (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
00145
00146
00147 #define __glibcxx_digits10(T) \
00148 (__glibcxx_digits (T) * 643 / 2136)
00149
00150
00151 _GLIBCXX_BEGIN_NAMESPACE(std)
00152
00153
00154
00155
00156
00157
00158 enum float_round_style
00159 {
00160 round_indeterminate = -1,
00161 round_toward_zero = 0,
00162 round_to_nearest = 1,
00163 round_toward_infinity = 2,
00164 round_toward_neg_infinity = 3
00165 };
00166
00167
00168
00169
00170
00171
00172
00173 enum float_denorm_style
00174 {
00175
00176 denorm_indeterminate = -1,
00177
00178 denorm_absent = 0,
00179
00180 denorm_present = 1
00181 };
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193 struct __numeric_limits_base
00194 {
00195
00196
00197 static const bool is_specialized = false;
00198
00199
00200
00201
00202 static const int digits = 0;
00203
00204 static const int digits10 = 0;
00205
00206 static const bool is_signed = false;
00207
00208
00209
00210 static const bool is_integer = false;
00211
00212
00213
00214
00215 static const bool is_exact = false;
00216
00217
00218 static const int radix = 0;
00219
00220
00221
00222 static const int min_exponent = 0;
00223
00224
00225 static const int min_exponent10 = 0;
00226
00227
00228
00229 static const int max_exponent = 0;
00230
00231
00232 static const int max_exponent10 = 0;
00233
00234
00235 static const bool has_infinity = false;
00236
00237
00238 static const bool has_quiet_NaN = false;
00239
00240
00241 static const bool has_signaling_NaN = false;
00242
00243 static const float_denorm_style has_denorm = denorm_absent;
00244
00245
00246 static const bool has_denorm_loss = false;
00247
00248
00249
00250 static const bool is_iec559 = false;
00251
00252
00253
00254 static const bool is_bounded = false;
00255
00256
00257
00258
00259 static const bool is_modulo = false;
00260
00261
00262 static const bool traps = false;
00263
00264 static const bool tinyness_before = false;
00265
00266
00267
00268 static const float_round_style round_style = round_toward_zero;
00269 };
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282 template<typename _Tp>
00283 struct numeric_limits : public __numeric_limits_base
00284 {
00285
00286
00287 static _Tp min() throw() { return static_cast<_Tp>(0); }
00288
00289 static _Tp max() throw() { return static_cast<_Tp>(0); }
00290
00291
00292 static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
00293
00294 static _Tp round_error() throw() { return static_cast<_Tp>(0); }
00295
00296 static _Tp infinity() throw() { return static_cast<_Tp>(0); }
00297
00298 static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
00299
00300
00301 static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
00302
00303
00304
00305 static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
00306 };
00307
00308
00309
00310
00311
00312 template<>
00313 struct numeric_limits<bool>
00314 {
00315 static const bool is_specialized = true;
00316
00317 static bool min() throw()
00318 { return false; }
00319 static bool max() throw()
00320 { return true; }
00321
00322 static const int digits = 1;
00323 static const int digits10 = 0;
00324 static const bool is_signed = false;
00325 static const bool is_integer = true;
00326 static const bool is_exact = true;
00327 static const int radix = 2;
00328 static bool epsilon() throw()
00329 { return false; }
00330 static bool round_error() throw()
00331 { return false; }
00332
00333 static const int min_exponent = 0;
00334 static const int min_exponent10 = 0;
00335 static const int max_exponent = 0;
00336 static const int max_exponent10 = 0;
00337
00338 static const bool has_infinity = false;
00339 static const bool has_quiet_NaN = false;
00340 static const bool has_signaling_NaN = false;
00341 static const float_denorm_style has_denorm = denorm_absent;
00342 static const bool has_denorm_loss = false;
00343
00344 static bool infinity() throw()
00345 { return false; }
00346 static bool quiet_NaN() throw()
00347 { return false; }
00348 static bool signaling_NaN() throw()
00349 { return false; }
00350 static bool denorm_min() throw()
00351 { return false; }
00352
00353 static const bool is_iec559 = false;
00354 static const bool is_bounded = true;
00355 static const bool is_modulo = false;
00356
00357
00358
00359
00360 static const bool traps = __glibcxx_integral_traps;
00361 static const bool tinyness_before = false;
00362 static const float_round_style round_style = round_toward_zero;
00363 };
00364
00365
00366 template<>
00367 struct numeric_limits<char>
00368 {
00369 static const bool is_specialized = true;
00370
00371 static char min() throw()
00372 { return __glibcxx_min(char); }
00373 static char max() throw()
00374 { return __glibcxx_max(char); }
00375
00376 static const int digits = __glibcxx_digits (char);
00377 static const int digits10 = __glibcxx_digits10 (char);
00378 static const bool is_signed = __glibcxx_signed (char);
00379 static const bool is_integer = true;
00380 static const bool is_exact = true;
00381 static const int radix = 2;
00382 static char epsilon() throw()
00383 { return 0; }
00384 static char round_error() throw()
00385 { return 0; }
00386
00387 static const int min_exponent = 0;
00388 static const int min_exponent10 = 0;
00389 static const int max_exponent = 0;
00390 static const int max_exponent10 = 0;
00391
00392 static const bool has_infinity = false;
00393 static const bool has_quiet_NaN = false;
00394 static const bool has_signaling_NaN = false;
00395 static const float_denorm_style has_denorm = denorm_absent;
00396 static const bool has_denorm_loss = false;
00397
00398 static char infinity() throw()
00399 { return char(); }
00400 static char quiet_NaN() throw()
00401 { return char(); }
00402 static char signaling_NaN() throw()
00403 { return char(); }
00404 static char denorm_min() throw()
00405 { return static_cast<char>(0); }
00406
00407 static const bool is_iec559 = false;
00408 static const bool is_bounded = true;
00409 static const bool is_modulo = true;
00410
00411 static const bool traps = __glibcxx_integral_traps;
00412 static const bool tinyness_before = false;
00413 static const float_round_style round_style = round_toward_zero;
00414 };
00415
00416
00417 template<>
00418 struct numeric_limits<signed char>
00419 {
00420 static const bool is_specialized = true;
00421
00422 static signed char min() throw()
00423 { return -__SCHAR_MAX__ - 1; }
00424 static signed char max() throw()
00425 { return __SCHAR_MAX__; }
00426
00427 static const int digits = __glibcxx_digits (signed char);
00428 static const int digits10 = __glibcxx_digits10 (signed char);
00429 static const bool is_signed = true;
00430 static const bool is_integer = true;
00431 static const bool is_exact = true;
00432 static const int radix = 2;
00433 static signed char epsilon() throw()
00434 { return 0; }
00435 static signed char round_error() throw()
00436 { return 0; }
00437
00438 static const int min_exponent = 0;
00439 static const int min_exponent10 = 0;
00440 static const int max_exponent = 0;
00441 static const int max_exponent10 = 0;
00442
00443 static const bool has_infinity = false;
00444 static const bool has_quiet_NaN = false;
00445 static const bool has_signaling_NaN = false;
00446 static const float_denorm_style has_denorm = denorm_absent;
00447 static const bool has_denorm_loss = false;
00448
00449 static signed char infinity() throw()
00450 { return static_cast<signed char>(0); }
00451 static signed char quiet_NaN() throw()
00452 { return static_cast<signed char>(0); }
00453 static signed char signaling_NaN() throw()
00454 { return static_cast<signed char>(0); }
00455 static signed char denorm_min() throw()
00456 { return static_cast<signed char>(0); }
00457
00458 static const bool is_iec559 = false;
00459 static const bool is_bounded = true;
00460 static const bool is_modulo = true;
00461
00462 static const bool traps = __glibcxx_integral_traps;
00463 static const bool tinyness_before = false;
00464 static const float_round_style round_style = round_toward_zero;
00465 };
00466
00467
00468 template<>
00469 struct numeric_limits<unsigned char>
00470 {
00471 static const bool is_specialized = true;
00472
00473 static unsigned char min() throw()
00474 { return 0; }
00475 static unsigned char max() throw()
00476 { return __SCHAR_MAX__ * 2U + 1; }
00477
00478 static const int digits = __glibcxx_digits (unsigned char);
00479 static const int digits10 = __glibcxx_digits10 (unsigned char);
00480 static const bool is_signed = false;
00481 static const bool is_integer = true;
00482 static const bool is_exact = true;
00483 static const int radix = 2;
00484 static unsigned char epsilon() throw()
00485 { return 0; }
00486 static unsigned char round_error() throw()
00487 { return 0; }
00488
00489 static const int min_exponent = 0;
00490 static const int min_exponent10 = 0;
00491 static const int max_exponent = 0;
00492 static const int max_exponent10 = 0;
00493
00494 static const bool has_infinity = false;
00495 static const bool has_quiet_NaN = false;
00496 static const bool has_signaling_NaN = false;
00497 static const float_denorm_style has_denorm = denorm_absent;
00498 static const bool has_denorm_loss = false;
00499
00500 static unsigned char infinity() throw()
00501 { return static_cast<unsigned char>(0); }
00502 static unsigned char quiet_NaN() throw()
00503 { return static_cast<unsigned char>(0); }
00504 static unsigned char signaling_NaN() throw()
00505 { return static_cast<unsigned char>(0); }
00506 static unsigned char denorm_min() throw()
00507 { return static_cast<unsigned char>(0); }
00508
00509 static const bool is_iec559 = false;
00510 static const bool is_bounded = true;
00511 static const bool is_modulo = true;
00512
00513 static const bool traps = __glibcxx_integral_traps;
00514 static const bool tinyness_before = false;
00515 static const float_round_style round_style = round_toward_zero;
00516 };
00517
00518
00519 template<>
00520 struct numeric_limits<wchar_t>
00521 {
00522 static const bool is_specialized = true;
00523
00524 static wchar_t min() throw()
00525 { return __glibcxx_min (wchar_t); }
00526 static wchar_t max() throw()
00527 { return __glibcxx_max (wchar_t); }
00528
00529 static const int digits = __glibcxx_digits (wchar_t);
00530 static const int digits10 = __glibcxx_digits10 (wchar_t);
00531 static const bool is_signed = __glibcxx_signed (wchar_t);
00532 static const bool is_integer = true;
00533 static const bool is_exact = true;
00534 static const int radix = 2;
00535 static wchar_t epsilon() throw()
00536 { return 0; }
00537 static wchar_t round_error() throw()
00538 { return 0; }
00539
00540 static const int min_exponent = 0;
00541 static const int min_exponent10 = 0;
00542 static const int max_exponent = 0;
00543 static const int max_exponent10 = 0;
00544
00545 static const bool has_infinity = false;
00546 static const bool has_quiet_NaN = false;
00547 static const bool has_signaling_NaN = false;
00548 static const float_denorm_style has_denorm = denorm_absent;
00549 static const bool has_denorm_loss = false;
00550
00551 static wchar_t infinity() throw()
00552 { return wchar_t(); }
00553 static wchar_t quiet_NaN() throw()
00554 { return wchar_t(); }
00555 static wchar_t signaling_NaN() throw()
00556 { return wchar_t(); }
00557 static wchar_t denorm_min() throw()
00558 { return wchar_t(); }
00559
00560 static const bool is_iec559 = false;
00561 static const bool is_bounded = true;
00562 static const bool is_modulo = true;
00563
00564 static const bool traps = __glibcxx_integral_traps;
00565 static const bool tinyness_before = false;
00566 static const float_round_style round_style = round_toward_zero;
00567 };
00568
00569
00570 template<>
00571 struct numeric_limits<short>
00572 {
00573 static const bool is_specialized = true;
00574
00575 static short min() throw()
00576 { return -__SHRT_MAX__ - 1; }
00577 static short max() throw()
00578 { return __SHRT_MAX__; }
00579
00580 static const int digits = __glibcxx_digits (short);
00581 static const int digits10 = __glibcxx_digits10 (short);
00582 static const bool is_signed = true;
00583 static const bool is_integer = true;
00584 static const bool is_exact = true;
00585 static const int radix = 2;
00586 static short epsilon() throw()
00587 { return 0; }
00588 static short round_error() throw()
00589 { return 0; }
00590
00591 static const int min_exponent = 0;
00592 static const int min_exponent10 = 0;
00593 static const int max_exponent = 0;
00594 static const int max_exponent10 = 0;
00595
00596 static const bool has_infinity = false;
00597 static const bool has_quiet_NaN = false;
00598 static const bool has_signaling_NaN = false;
00599 static const float_denorm_style has_denorm = denorm_absent;
00600 static const bool has_denorm_loss = false;
00601
00602 static short infinity() throw()
00603 { return short(); }
00604 static short quiet_NaN() throw()
00605 { return short(); }
00606 static short signaling_NaN() throw()
00607 { return short(); }
00608 static short denorm_min() throw()
00609 { return short(); }
00610
00611 static const bool is_iec559 = false;
00612 static const bool is_bounded = true;
00613 static const bool is_modulo = true;
00614
00615 static const bool traps = __glibcxx_integral_traps;
00616 static const bool tinyness_before = false;
00617 static const float_round_style round_style = round_toward_zero;
00618 };
00619
00620
00621 template<>
00622 struct numeric_limits<unsigned short>
00623 {
00624 static const bool is_specialized = true;
00625
00626 static unsigned short min() throw()
00627 { return 0; }
00628 static unsigned short max() throw()
00629 { return __SHRT_MAX__ * 2U + 1; }
00630
00631 static const int digits = __glibcxx_digits (unsigned short);
00632 static const int digits10 = __glibcxx_digits10 (unsigned short);
00633 static const bool is_signed = false;
00634 static const bool is_integer = true;
00635 static const bool is_exact = true;
00636 static const int radix = 2;
00637 static unsigned short epsilon() throw()
00638 { return 0; }
00639 static unsigned short round_error() throw()
00640 { return 0; }
00641
00642 static const int min_exponent = 0;
00643 static const int min_exponent10 = 0;
00644 static const int max_exponent = 0;
00645 static const int max_exponent10 = 0;
00646
00647 static const bool has_infinity = false;
00648 static const bool has_quiet_NaN = false;
00649 static const bool has_signaling_NaN = false;
00650 static const float_denorm_style has_denorm = denorm_absent;
00651 static const bool has_denorm_loss = false;
00652
00653 static unsigned short infinity() throw()
00654 { return static_cast<unsigned short>(0); }
00655 static unsigned short quiet_NaN() throw()
00656 { return static_cast<unsigned short>(0); }
00657 static unsigned short signaling_NaN() throw()
00658 { return static_cast<unsigned short>(0); }
00659 static unsigned short denorm_min() throw()
00660 { return static_cast<unsigned short>(0); }
00661
00662 static const bool is_iec559 = false;
00663 static const bool is_bounded = true;
00664 static const bool is_modulo = true;
00665
00666 static const bool traps = __glibcxx_integral_traps;
00667 static const bool tinyness_before = false;
00668 static const float_round_style round_style = round_toward_zero;
00669 };
00670
00671
00672 template<>
00673 struct numeric_limits<int>
00674 {
00675 static const bool is_specialized = true;
00676
00677 static int min() throw()
00678 { return -__INT_MAX__ - 1; }
00679 static int max() throw()
00680 { return __INT_MAX__; }
00681
00682 static const int digits = __glibcxx_digits (int);
00683 static const int digits10 = __glibcxx_digits10 (int);
00684 static const bool is_signed = true;
00685 static const bool is_integer = true;
00686 static const bool is_exact = true;
00687 static const int radix = 2;
00688 static int epsilon() throw()
00689 { return 0; }
00690 static int round_error() throw()
00691 { return 0; }
00692
00693 static const int min_exponent = 0;
00694 static const int min_exponent10 = 0;
00695 static const int max_exponent = 0;
00696 static const int max_exponent10 = 0;
00697
00698 static const bool has_infinity = false;
00699 static const bool has_quiet_NaN = false;
00700 static const bool has_signaling_NaN = false;
00701 static const float_denorm_style has_denorm = denorm_absent;
00702 static const bool has_denorm_loss = false;
00703
00704 static int infinity() throw()
00705 { return static_cast<int>(0); }
00706 static int quiet_NaN() throw()
00707 { return static_cast<int>(0); }
00708 static int signaling_NaN() throw()
00709 { return static_cast<int>(0); }
00710 static int denorm_min() throw()
00711 { return static_cast<int>(0); }
00712
00713 static const bool is_iec559 = false;
00714 static const bool is_bounded = true;
00715 static const bool is_modulo = true;
00716
00717 static const bool traps = __glibcxx_integral_traps;
00718 static const bool tinyness_before = false;
00719 static const float_round_style round_style = round_toward_zero;
00720 };
00721
00722
00723 template<>
00724 struct numeric_limits<unsigned int>
00725 {
00726 static const bool is_specialized = true;
00727
00728 static unsigned int min() throw()
00729 { return 0; }
00730 static unsigned int max() throw()
00731 { return __INT_MAX__ * 2U + 1; }
00732
00733 static const int digits = __glibcxx_digits (unsigned int);
00734 static const int digits10 = __glibcxx_digits10 (unsigned int);
00735 static const bool is_signed = false;
00736 static const bool is_integer = true;
00737 static const bool is_exact = true;
00738 static const int radix = 2;
00739 static unsigned int epsilon() throw()
00740 { return 0; }
00741 static unsigned int round_error() throw()
00742 { return 0; }
00743
00744 static const int min_exponent = 0;
00745 static const int min_exponent10 = 0;
00746 static const int max_exponent = 0;
00747 static const int max_exponent10 = 0;
00748
00749 static const bool has_infinity = false;
00750 static const bool has_quiet_NaN = false;
00751 static const bool has_signaling_NaN = false;
00752 static const float_denorm_style has_denorm = denorm_absent;
00753 static const bool has_denorm_loss = false;
00754
00755 static unsigned int infinity() throw()
00756 { return static_cast<unsigned int>(0); }
00757 static unsigned int quiet_NaN() throw()
00758 { return static_cast<unsigned int>(0); }
00759 static unsigned int signaling_NaN() throw()
00760 { return static_cast<unsigned int>(0); }
00761 static unsigned int denorm_min() throw()
00762 { return static_cast<unsigned int>(0); }
00763
00764 static const bool is_iec559 = false;
00765 static const bool is_bounded = true;
00766 static const bool is_modulo = true;
00767
00768 static const bool traps = __glibcxx_integral_traps;
00769 static const bool tinyness_before = false;
00770 static const float_round_style round_style = round_toward_zero;
00771 };
00772
00773
00774 template<>
00775 struct numeric_limits<long>
00776 {
00777 static const bool is_specialized = true;
00778
00779 static long min() throw()
00780 { return -__LONG_MAX__ - 1; }
00781 static long max() throw()
00782 { return __LONG_MAX__; }
00783
00784 static const int digits = __glibcxx_digits (long);
00785 static const int digits10 = __glibcxx_digits10 (long);
00786 static const bool is_signed = true;
00787 static const bool is_integer = true;
00788 static const bool is_exact = true;
00789 static const int radix = 2;
00790 static long epsilon() throw()
00791 { return 0; }
00792 static long round_error() throw()
00793 { return 0; }
00794
00795 static const int min_exponent = 0;
00796 static const int min_exponent10 = 0;
00797 static const int max_exponent = 0;
00798 static const int max_exponent10 = 0;
00799
00800 static const bool has_infinity = false;
00801 static const bool has_quiet_NaN = false;
00802 static const bool has_signaling_NaN = false;
00803 static const float_denorm_style has_denorm = denorm_absent;
00804 static const bool has_denorm_loss = false;
00805
00806 static long infinity() throw()
00807 { return static_cast<long>(0); }
00808 static long quiet_NaN() throw()
00809 { return static_cast<long>(0); }
00810 static long signaling_NaN() throw()
00811 { return static_cast<long>(0); }
00812 static long denorm_min() throw()
00813 { return static_cast<long>(0); }
00814
00815 static const bool is_iec559 = false;
00816 static const bool is_bounded = true;
00817 static const bool is_modulo = true;
00818
00819 static const bool traps = __glibcxx_integral_traps;
00820 static const bool tinyness_before = false;
00821 static const float_round_style round_style = round_toward_zero;
00822 };
00823
00824
00825 template<>
00826 struct numeric_limits<unsigned long>
00827 {
00828 static const bool is_specialized = true;
00829
00830 static unsigned long min() throw()
00831 { return 0; }
00832 static unsigned long max() throw()
00833 { return __LONG_MAX__ * 2UL + 1; }
00834
00835 static const int digits = __glibcxx_digits (unsigned long);
00836 static const int digits10 = __glibcxx_digits10 (unsigned long);
00837 static const bool is_signed = false;
00838 static const bool is_integer = true;
00839 static const bool is_exact = true;
00840 static const int radix = 2;
00841 static unsigned long epsilon() throw()
00842 { return 0; }
00843 static unsigned long round_error() throw()
00844 { return 0; }
00845
00846 static const int min_exponent = 0;
00847 static const int min_exponent10 = 0;
00848 static const int max_exponent = 0;
00849 static const int max_exponent10 = 0;
00850
00851 static const bool has_infinity = false;
00852 static const bool has_quiet_NaN = false;
00853 static const bool has_signaling_NaN = false;
00854 static const float_denorm_style has_denorm = denorm_absent;
00855 static const bool has_denorm_loss = false;
00856
00857 static unsigned long infinity() throw()
00858 { return static_cast<unsigned long>(0); }
00859 static unsigned long quiet_NaN() throw()
00860 { return static_cast<unsigned long>(0); }
00861 static unsigned long signaling_NaN() throw()
00862 { return static_cast<unsigned long>(0); }
00863 static unsigned long denorm_min() throw()
00864 { return static_cast<unsigned long>(0); }
00865
00866 static const bool is_iec559 = false;
00867 static const bool is_bounded = true;
00868 static const bool is_modulo = true;
00869
00870 static const bool traps = __glibcxx_integral_traps;
00871 static const bool tinyness_before = false;
00872 static const float_round_style round_style = round_toward_zero;
00873 };
00874
00875
00876 template<>
00877 struct numeric_limits<long long>
00878 {
00879 static const bool is_specialized = true;
00880
00881 static long long min() throw()
00882 { return -__LONG_LONG_MAX__ - 1; }
00883 static long long max() throw()
00884 { return __LONG_LONG_MAX__; }
00885
00886 static const int digits = __glibcxx_digits (long long);
00887 static const int digits10 = __glibcxx_digits10 (long long);
00888 static const bool is_signed = true;
00889 static const bool is_integer = true;
00890 static const bool is_exact = true;
00891 static const int radix = 2;
00892 static long long epsilon() throw()
00893 { return 0; }
00894 static long long round_error() throw()
00895 { return 0; }
00896
00897 static const int min_exponent = 0;
00898 static const int min_exponent10 = 0;
00899 static const int max_exponent = 0;
00900 static const int max_exponent10 = 0;
00901
00902 static const bool has_infinity = false;
00903 static const bool has_quiet_NaN = false;
00904 static const bool has_signaling_NaN = false;
00905 static const float_denorm_style has_denorm = denorm_absent;
00906 static const bool has_denorm_loss = false;
00907
00908 static long long infinity() throw()
00909 { return static_cast<long long>(0); }
00910 static long long quiet_NaN() throw()
00911 { return static_cast<long long>(0); }
00912 static long long signaling_NaN() throw()
00913 { return static_cast<long long>(0); }
00914 static long long denorm_min() throw()
00915 { return static_cast<long long>(0); }
00916
00917 static const bool is_iec559 = false;
00918 static const bool is_bounded = true;
00919 static const bool is_modulo = true;
00920
00921 static const bool traps = __glibcxx_integral_traps;
00922 static const bool tinyness_before = false;
00923 static const float_round_style round_style = round_toward_zero;
00924 };
00925
00926
00927 template<>
00928 struct numeric_limits<unsigned long long>
00929 {
00930 static const bool is_specialized = true;
00931
00932 static unsigned long long min() throw()
00933 { return 0; }
00934 static unsigned long long max() throw()
00935 { return __LONG_LONG_MAX__ * 2ULL + 1; }
00936
00937 static const int digits = __glibcxx_digits (unsigned long long);
00938 static const int digits10 = __glibcxx_digits10 (unsigned long long);
00939 static const bool is_signed = false;
00940 static const bool is_integer = true;
00941 static const bool is_exact = true;
00942 static const int radix = 2;
00943 static unsigned long long epsilon() throw()
00944 { return 0; }
00945 static unsigned long long round_error() throw()
00946 { return 0; }
00947
00948 static const int min_exponent = 0;
00949 static const int min_exponent10 = 0;
00950 static const int max_exponent = 0;
00951 static const int max_exponent10 = 0;
00952
00953 static const bool has_infinity = false;
00954 static const bool has_quiet_NaN = false;
00955 static const bool has_signaling_NaN = false;
00956 static const float_denorm_style has_denorm = denorm_absent;
00957 static const bool has_denorm_loss = false;
00958
00959 static unsigned long long infinity() throw()
00960 { return static_cast<unsigned long long>(0); }
00961 static unsigned long long quiet_NaN() throw()
00962 { return static_cast<unsigned long long>(0); }
00963 static unsigned long long signaling_NaN() throw()
00964 { return static_cast<unsigned long long>(0); }
00965 static unsigned long long denorm_min() throw()
00966 { return static_cast<unsigned long long>(0); }
00967
00968 static const bool is_iec559 = false;
00969 static const bool is_bounded = true;
00970 static const bool is_modulo = true;
00971
00972 static const bool traps = __glibcxx_integral_traps;
00973 static const bool tinyness_before = false;
00974 static const float_round_style round_style = round_toward_zero;
00975 };
00976
00977
00978 template<>
00979 struct numeric_limits<float>
00980 {
00981 static const bool is_specialized = true;
00982
00983 static float min() throw()
00984 { return __FLT_MIN__; }
00985 static float max() throw()
00986 { return __FLT_MAX__; }
00987
00988 static const int digits = __FLT_MANT_DIG__;
00989 static const int digits10 = __FLT_DIG__;
00990 static const bool is_signed = true;
00991 static const bool is_integer = false;
00992 static const bool is_exact = false;
00993 static const int radix = __FLT_RADIX__;
00994 static float epsilon() throw()
00995 { return __FLT_EPSILON__; }
00996 static float round_error() throw()
00997 { return 0.5F; }
00998
00999 static const int min_exponent = __FLT_MIN_EXP__;
01000 static const int min_exponent10 = __FLT_MIN_10_EXP__;
01001 static const int max_exponent = __FLT_MAX_EXP__;
01002 static const int max_exponent10 = __FLT_MAX_10_EXP__;
01003
01004 static const bool has_infinity = __FLT_HAS_INFINITY__;
01005 static const bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
01006 static const bool has_signaling_NaN = has_quiet_NaN;
01007 static const float_denorm_style has_denorm
01008 = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
01009 static const bool has_denorm_loss = __glibcxx_float_has_denorm_loss;
01010
01011 static float infinity() throw()
01012 { return __builtin_huge_valf (); }
01013 static float quiet_NaN() throw()
01014 { return __builtin_nanf (""); }
01015 static float signaling_NaN() throw()
01016 { return __builtin_nansf (""); }
01017 static float denorm_min() throw()
01018 { return __FLT_DENORM_MIN__; }
01019
01020 static const bool is_iec559
01021 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
01022 static const bool is_bounded = true;
01023 static const bool is_modulo = false;
01024
01025 static const bool traps = __glibcxx_float_traps;
01026 static const bool tinyness_before = __glibcxx_float_tinyness_before;
01027 static const float_round_style round_style = round_to_nearest;
01028 };
01029
01030 #undef __glibcxx_float_has_denorm_loss
01031 #undef __glibcxx_float_traps
01032 #undef __glibcxx_float_tinyness_before
01033
01034
01035 template<>
01036 struct numeric_limits<double>
01037 {
01038 static const bool is_specialized = true;
01039
01040 static double min() throw()
01041 { return __DBL_MIN__; }
01042 static double max() throw()
01043 { return __DBL_MAX__; }
01044
01045 static const int digits = __DBL_MANT_DIG__;
01046 static const int digits10 = __DBL_DIG__;
01047 static const bool is_signed = true;
01048 static const bool is_integer = false;
01049 static const bool is_exact = false;
01050 static const int radix = __FLT_RADIX__;
01051 static double epsilon() throw()
01052 { return __DBL_EPSILON__; }
01053 static double round_error() throw()
01054 { return 0.5; }
01055
01056 static const int min_exponent = __DBL_MIN_EXP__;
01057 static const int min_exponent10 = __DBL_MIN_10_EXP__;
01058 static const int max_exponent = __DBL_MAX_EXP__;
01059 static const int max_exponent10 = __DBL_MAX_10_EXP__;
01060
01061 static const bool has_infinity = __DBL_HAS_INFINITY__;
01062 static const bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
01063 static const bool has_signaling_NaN = has_quiet_NaN;
01064 static const float_denorm_style has_denorm
01065 = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
01066 static const bool has_denorm_loss = __glibcxx_double_has_denorm_loss;
01067
01068 static double infinity() throw()
01069 { return __builtin_huge_val(); }
01070 static double quiet_NaN() throw()
01071 { return __builtin_nan (""); }
01072 static double signaling_NaN() throw()
01073 { return __builtin_nans (""); }
01074 static double denorm_min() throw()
01075 { return __DBL_DENORM_MIN__; }
01076
01077 static const bool is_iec559
01078 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
01079 static const bool is_bounded = true;
01080 static const bool is_modulo = false;
01081
01082 static const bool traps = __glibcxx_double_traps;
01083 static const bool tinyness_before = __glibcxx_double_tinyness_before;
01084 static const float_round_style round_style = round_to_nearest;
01085 };
01086
01087 #undef __glibcxx_double_has_denorm_loss
01088 #undef __glibcxx_double_traps
01089 #undef __glibcxx_double_tinyness_before
01090
01091
01092 template<>
01093 struct numeric_limits<long double>
01094 {
01095 static const bool is_specialized = true;
01096
01097 static long double min() throw()
01098 { return __LDBL_MIN__; }
01099 static long double max() throw()
01100 { return __LDBL_MAX__; }
01101
01102 static const int digits = __LDBL_MANT_DIG__;
01103 static const int digits10 = __LDBL_DIG__;
01104 static const bool is_signed = true;
01105 static const bool is_integer = false;
01106 static const bool is_exact = false;
01107 static const int radix = __FLT_RADIX__;
01108 static long double epsilon() throw()
01109 { return __LDBL_EPSILON__; }
01110 static long double round_error() throw()
01111 { return 0.5L; }
01112
01113 static const int min_exponent = __LDBL_MIN_EXP__;
01114 static const int min_exponent10 = __LDBL_MIN_10_EXP__;
01115 static const int max_exponent = __LDBL_MAX_EXP__;
01116 static const int max_exponent10 = __LDBL_MAX_10_EXP__;
01117
01118 static const bool has_infinity = __LDBL_HAS_INFINITY__;
01119 static const bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
01120 static const bool has_signaling_NaN = has_quiet_NaN;
01121 static const float_denorm_style has_denorm
01122 = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
01123 static const bool has_denorm_loss
01124 = __glibcxx_long_double_has_denorm_loss;
01125
01126 static long double infinity() throw()
01127 { return __builtin_huge_vall (); }
01128 static long double quiet_NaN() throw()
01129 { return __builtin_nanl (""); }
01130 static long double signaling_NaN() throw()
01131 { return __builtin_nansl (""); }
01132 static long double denorm_min() throw()
01133 { return __LDBL_DENORM_MIN__; }
01134
01135 static const bool is_iec559
01136 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
01137 static const bool is_bounded = true;
01138 static const bool is_modulo = false;
01139
01140 static const bool traps = __glibcxx_long_double_traps;
01141 static const bool tinyness_before = __glibcxx_long_double_tinyness_before;
01142 static const float_round_style round_style = round_to_nearest;
01143 };
01144
01145 #undef __glibcxx_long_double_has_denorm_loss
01146 #undef __glibcxx_long_double_traps
01147 #undef __glibcxx_long_double_tinyness_before
01148
01149 _GLIBCXX_END_NAMESPACE
01150
01151 #undef __glibcxx_signed
01152 #undef __glibcxx_min
01153 #undef __glibcxx_max
01154 #undef __glibcxx_digits
01155 #undef __glibcxx_digits10
01156
01157 #endif // _GLIBCXX_NUMERIC_LIMITS