Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122// Numerical limits for C++#include <climits>#include <cwchar>#include <cfloat>#include <ymath.h>namespace std{ // Rounding style for floating point numbers enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; // How to represent denormalized values enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; template<class Type> class numeric_limits { public: // Not specialized by default static const bool is_specialized = false; // Bounding static const bool is_bounded = false; static Type lowest() throw(); static Type max( ) throw( ); static Type min( ) throw( ); // infinity static const bool has_infinity = false; static Type infinity( ) throw( ); // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static Type denorm_min( ) throw( ); // Digits static const int digits = 0; static const int digits10 = 0; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static Type quiet_NaN( ) throw( ); static Type signaling_NaN( ) throw( ); // Information static const bool is_exact = false; static const bool is_iec559 = false; static const bool is_integer = false; static const bool is_modulo = false; static const bool is_signed = false; // misc static Type epsilon( ) throw( ); static const int max_digits10 = 0; static const int radix = 0; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static Type round_error( ) throw( ); static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<wchar_t> { static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static wchar_t lowest() throw() {return WCHAR_MIN;} static wchar_t max( ) throw() {return WCHAR_MAX;} static wchar_t min( ) throw() {return WCHAR_MIN;} // infinity static const bool has_infinity = false; static wchar_t infinity( ) throw() {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static wchar_t denorm_min( ) throw() {return 0;} // Digits static const bool is_signed = WCHAR_MIN != 0; static const int digits = sizeof(wchar_t) * CHAR_BIT - (is_signed ? 1 : 0); // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static wchar_t quiet_NaN( ) throw() {return 0;} static wchar_t signaling_NaN( ) throw() {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; // misc static wchar_t epsilon( ) throw() {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static wchar_t round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<bool> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static bool lowest() throw() {return false;} static bool max( ) throw( ) {return true;} static bool min( ) throw( ) {return false;} // infinity static const bool has_infinity = false; static bool infinity( ) throw( ) {return false;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static bool denorm_min( ) throw( ) {return false;} // Digits static const int digits = 1; static const int digits10 = 0; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static bool quiet_NaN( ) throw( ) {return false;} static bool signaling_NaN( ) throw( ) {return false;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = false; static const bool is_signed = false; // misc static bool epsilon( ) throw( ) {return false;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static bool round_error( ) throw( ) {return false;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<char> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static char lowest() throw() {return CHAR_MIN;} static char max( ) throw( ) {return CHAR_MAX;} static char min( ) throw( ) {return CHAR_MIN;} // infinity static const bool has_infinity = false; static char infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static char denorm_min( ) throw( ) {return 0;} // Digits static const bool is_signed = CHAR_MIN != 0; static const int digits = sizeof(char) * CHAR_BIT - (is_signed ? 1 : 0); // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static char quiet_NaN( ) throw( ) {return 0;} static char signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; // misc static char epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static char round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<signed char> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static signed char lowest() throw() {return SCHAR_MIN;} static signed char max( ) throw( ) {return SCHAR_MAX;} static signed char min( ) throw( ) {return SCHAR_MIN;} // infinity static const bool has_infinity = false; static signed char infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static signed char denorm_min( ) throw( ) {return 0;} // Digits static const int digits = sizeof(signed char) * CHAR_BIT - 1; // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static signed char quiet_NaN( ) throw( ) {return 0;} static signed char signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; static const bool is_signed = true; // misc static signed char epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static signed char round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<unsigned char> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static unsigned char lowest() throw() {return 0;} static unsigned char max( ) throw( ) {return UCHAR_MAX;} static unsigned char min( ) throw( ) {return 0;} // infinity static const bool has_infinity = false; static unsigned char infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned char denorm_min( ) throw( ) {return 0;} // Digits static const int digits = sizeof(unsigned char) * CHAR_BIT; // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static unsigned char quiet_NaN( ) throw( ) {return 0;} static unsigned char signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; static const bool is_signed = false; // misc static unsigned char epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static unsigned char round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<short> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static short lowest() throw() {return SHRT_MIN;} static short max( ) throw( ) {return SHRT_MAX;} static short min( ) throw( ) {return SHRT_MIN;} // infinity static const bool has_infinity = false; static short infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static short denorm_min( ) throw( ) {return 0;} // Digits static const bool is_signed = SHRT_MIN != 0; static const int digits = sizeof(short) * CHAR_BIT - (is_signed ? 1 : 0); // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static short quiet_NaN( ) throw( ) {return 0;} static short signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; // misc static short epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static short round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<unsigned short> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static unsigned short lowest() throw() {return 0;} static unsigned short max( ) throw( ) {return USHRT_MAX;} static unsigned short min( ) throw( ) {return 0;} // infinity static const bool has_infinity = false; static unsigned short infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned short denorm_min( ) throw( ) {return 0;} // Digits static const int digits = sizeof(unsigned short) * CHAR_BIT; // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static unsigned short quiet_NaN( ) throw( ) {return 0;} static unsigned short signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; static const bool is_signed = false; // misc static unsigned short epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static unsigned short round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<int> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static int lowest() throw() {return INT_MIN;} static int max( ) throw( ) {return INT_MAX;} static int min( ) throw( ) {return INT_MIN;} // infinity static const bool has_infinity = false; static int infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static int denorm_min( ) throw( ) {return 0;} // Digits static const bool is_signed = INT_MIN != 0; static const int digits = sizeof(int) * CHAR_BIT - (is_signed ? 1 : 0); // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static int quiet_NaN( ) throw( ) {return 0;} static int signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; // misc static int epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static int round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<unsigned int> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static unsigned int lowest() throw() {return 0;} static unsigned int max( ) throw( ) {return UINT_MAX;} static unsigned int min( ) throw( ) {return 0;} // infinity static const bool has_infinity = false; static unsigned int infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned int denorm_min( ) throw( ) {return 0;} // Digits static const int digits = sizeof(unsigned int) * CHAR_BIT; // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static unsigned int quiet_NaN( ) throw( ) {return 0;} static unsigned int signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; static const bool is_signed = false; // misc static unsigned int epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const int radix = 2; static const bool traps = false; // exponent static const int max_exponent = 0; static const int max_exponent10 = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; // rounding static unsigned int round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<long> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static long lowest() throw() {return LONG_MIN;} static long max( ) throw( ) {return LONG_MAX;} static long min( ) throw( ) {return LONG_MIN;} // infinity static const bool has_infinity = false; static long infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long denorm_min( ) throw( ) {return 0;} // Digits static const bool is_signed = LONG_MIN != 0; static const long digits = sizeof(long) * CHAR_BIT - (is_signed ? 1 : 0); // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const long digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static long quiet_NaN( ) throw( ) {return 0;} static long signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_longeger = true; static const bool is_modulo = true; // misc static long epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const long radix = 2; static const bool traps = false; // exponent static const long max_exponent = 0; static const long max_exponent10 = 0; static const long min_exponent = 0; static const long min_exponent10 = 0; // rounding static long round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<unsigned long> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static unsigned long lowest() throw() {return 0;} static unsigned long max( ) throw( ) {return ULONG_MAX;} static unsigned long min( ) throw( ) {return 0;} // infinity static const bool has_infinity = false; static unsigned long infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long denorm_min( ) throw( ) {return 0;} // Digits static const long digits = sizeof(unsigned long) * CHAR_BIT; // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const long digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static unsigned long quiet_NaN( ) throw( ) {return 0;} static unsigned long signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_longeger = true; static const bool is_modulo = true; static const bool is_signed = false; // misc static unsigned long epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const long radix = 2; static const bool traps = false; // exponent static const long max_exponent = 0; static const long max_exponent10 = 0; static const long min_exponent = 0; static const long min_exponent10 = 0; // rounding static unsigned long round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<long long> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static long long lowest() throw() {return LLONG_MIN;} static long long max( ) throw( ) {return LLONG_MAX;} static long long min( ) throw( ) {return LLONG_MIN;} // infinity static const bool has_infinity = false; static long long infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long long denorm_min( ) throw( ) {return 0;} // Digits static const long long digits = sizeof(long long) * CHAR_BIT - (LLONG_MIN != 0 ? 1 : 0); // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const long long digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static long long quiet_NaN( ) throw( ) {return 0;} static long long signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; static const bool is_signed = LLONG_MIN != 0; // misc static long long epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const long long radix = 2; static const bool traps = false; // exponent static const long long max_exponent = 0; static const long long max_exponent10 = 0; static const long long min_exponent = 0; static const long long min_exponent10 = 0; // rounding static long long round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<unsigned long long> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static unsigned long long lowest() throw() {return 0;} static unsigned long long max( ) throw( ) {return ULLONG_MAX;} static unsigned long long min( ) throw( ) {return 0;} // infinity static const bool has_infinity = false; static unsigned long long infinity( ) throw( ) {return 0;} // Denormalization static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long long denorm_min( ) throw( ) {return 0;} // Digits static const long long digits = sizeof(unsigned long long) * CHAR_BIT; // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const long long digits10 = digits * 643 / 2136; // NaN static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static unsigned long long quiet_NaN( ) throw( ) {return 0;} static unsigned long long signaling_NaN( ) throw( ) {return 0;} // Information static const bool is_exact = true; static const bool is_iec559 = false; static const bool is_integer = true; static const bool is_modulo = true; static const bool is_signed = false; // misc static unsigned long long epsilon( ) throw( ) {return 0;} static const int max_digits10 = 0; static const long long radix = 2; static const bool traps = false; // exponent static const long long max_exponent = 0; static const long long max_exponent10 = 0; static const long long min_exponent = 0; static const long long min_exponent10 = 0; // rounding static unsigned long long round_error( ) throw( ) {return 0;} static const float_round_style round_style = round_toward_zero; static const bool tinyness_before = false; }; template<> class numeric_limits<float> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static float lowest() throw() {return -FLT_MAX;} static float max( ) throw( ) {return FLT_MAX;} static float min( ) throw( ) {return FLT_MIN;} // infinity static const bool has_infinity = true; static float infinity( ) throw( ) //{return _FInf._Float;} { static const unsigned __inf_bytes = 0x7f800000; return *(float*)&__inf_bytes; } // Denormalization static const float_denorm_style has_denorm = denorm_present; static const bool has_denorm_loss = true; static float denorm_min( ) throw( ) {return _FDenorm._Float;} // Digits static const int digits = FLT_MANT_DIG; static const int digits10 = FLT_DIG; // NaN static const bool has_quiet_NaN = true; static const bool has_signaling_NaN = true; static float quiet_NaN( ) throw( ) {return _FNan._Float;} static float signaling_NaN( ) throw( ) {return _FSnan._Float;} // Information static const bool is_exact = false; static const bool is_iec559 = true; static const bool is_integer = false; static const bool is_modulo = false; static const bool is_signed = true; // misc static float epsilon( ) throw( ) {return FLT_EPSILON;} // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int max_digits10 = FLT_MANT_DIG * 643 / 2136; static const int radix = FLT_RADIX; static const bool traps = true; // exponent static const int max_exponent = FLT_MAX_EXP; static const int max_exponent10 = FLT_MAX_10_EXP; static const int min_exponent = FLT_MIN_EXP; static const int min_exponent10 = FLT_MIN_10_EXP; // rounding static float round_error( ) throw( ) {return 0.5f;} static const float_round_style round_style = round_to_nearest; static const bool tinyness_before = true; }; template<> class numeric_limits<double> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static double lowest() throw() {return -DBL_MAX;} static double max( ) throw( ) {return DBL_MAX;} static double min( ) throw( ) {return DBL_MIN;} // infinity static const bool has_infinity = true; static double infinity( ) throw( ) {return _Inf._Double;} // Denormalization static const float_denorm_style has_denorm = denorm_present; static const bool has_denorm_loss = true; static double denorm_min( ) throw( ) {return _Denorm._Double;} // Digits static const int digits = DBL_MANT_DIG; static const int digits10 = DBL_DIG; // NaN static const bool has_quiet_NaN = true; static const bool has_signaling_NaN = true; static double quiet_NaN( ) throw( ) {return _Nan._Double;} static double signaling_NaN( ) throw( ) {return _Snan._Double;} // Information static const bool is_exact = false; static const bool is_iec559 = true; static const bool is_integer = false; static const bool is_modulo = false; static const bool is_signed = true; // misc static double epsilon( ) throw( ) {return DBL_EPSILON;} // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int max_digits10 = DBL_MANT_DIG * 643 / 2136; static const int radix = FLT_RADIX; static const bool traps = true; // exponent static const int max_exponent = DBL_MAX_EXP; static const int max_exponent10 = DBL_MAX_10_EXP; static const int min_exponent = DBL_MIN_EXP; static const int min_exponent10 = DBL_MIN_10_EXP; // rounding static double round_error( ) throw( ) {return 0.5f;} static const float_round_style round_style = round_to_nearest; static const bool tinyness_before = true; }; template<> class numeric_limits<long double> { public: static const bool is_specialized = true; // Bounding static const bool is_bounded = true; static long double lowest() throw() {return -LDBL_MAX;} static long double max( ) throw( ) {return LDBL_MAX;} static long double min( ) throw( ) {return DBL_MIN;} // infinity static const bool has_infinity = true; static long double infinity( ) throw( ) {return _LInf._Long_double;} // Denormalization static const float_denorm_style has_denorm = denorm_present; static const bool has_denorm_loss = true; static long double denorm_min( ) throw( ) {return _LDenorm._Long_double;} // Digits static const int digits = LDBL_MANT_DIG; static const int digits10 = LDBL_DIG; // NaN static const bool has_quiet_NaN = true; static const bool has_signaling_NaN = true; static long double quiet_NaN( ) throw( ) {return _LNan._Long_double;} static long double signaling_NaN( ) throw( ) {return _LSnan._Long_double;} // Information static const bool is_exact = false; static const bool is_iec559 = true; static const bool is_integer = false; static const bool is_modulo = false; static const bool is_signed = true; // misc static long double epsilon( ) throw( ) {return LDBL_EPSILON;} // The fraction 643/2136 approximates log10(2) to 7 significant digits. static const int max_digits10 = FLT_MANT_DIG * 643 / 2136; static const int radix = FLT_RADIX; static const bool traps = true; // exponent static const int max_exponent = LDBL_MAX_EXP; static const int max_exponent10 = LDBL_MAX_10_EXP; static const int min_exponent = LDBL_MIN_EXP; static const int min_exponent10 = LDBL_MIN_10_EXP; // rounding static long double round_error( ) throw( ) {return 0.5f;} static const float_round_style round_style = round_to_nearest; static const bool tinyness_before = true; };}