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