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