#ifndef __STD_LIMITS
#define __STD_LIMITS
/****************************************************************************
 *
 *  <limits> - Standard Library Fundamental Type Representation
 *
 ****************************************************************************
 *
 *  Copyright Digital Equipment Corporation 1996. All rights reserved.
 *
 *  Restricted Rights: Use, duplication, or disclosure by the U.S.
 *  Government is subject to restrictions as set forth in subparagraph
 *  (c) (1) (ii) of DFARS 252.227-7013, or in FAR 52.227-19, or in FAR
 *  52.227-14 Alt. III, as applicable.
 *
 *  This software is proprietary to and embodies the confidential
 *  technology of Digital Equipment Corporation. Possession, use, or
 *  copying of this software and media is authorized only pursuant to a
 *  valid written license from Digital or an authorized sublicensor.
 *
 *****************************************************************************
 */
#include <stl_macros>    // For DECCXX work-arounds
#include <stdcomp>
#include <limits.h>      // Implementation defined limits
#ifdef __USE_STD_IOSTREAM
#include <iosfwd>
#endif
#include <wchar.h>       // Implementation defined wchar limits
#include <float.h>       // Implementation defined float limits
#ifndef WCHAR_MAX
#   define    WCHAR_MAX     ((wchar_t)~0)
#endif
#ifndef WCHAR_MIN
#   define    WCHAR_MIN     0
#endif

//++
// On OpenVMS FLT_ROUNDS reflects the compile time rounding mode.  On
// Digital Unix this is currently not the case.  Until this is fixed,
// use the predefined compiler macro __FLT_ROUNDS to determine the
// compile time rounding mode on Digital Unix.
//--
#if defined (__VMS) 
#       define __NUMERIC_LIMITS_FLT_ROUNDS  FLT_ROUNDS
#else
#       ifndef __FLT_ROUNDS
#       define __FLT_ROUNDS 1
#       endif
#       define __NUMERIC_LIMITS_FLT_ROUNDS  __FLT_ROUNDS
#endif


#ifndef _RWSTD_NO_NAMESPACE
namespace std {
#endif


//++
//  Create 'public' enums
//--
    enum float_round_style {
      round_indeterminate       = -1,
      round_toward_zero         =  0,
      round_to_nearest          =  1,
      round_toward_infinity     =  2,
      round_toward_neg_infinity =  3
    };

    enum float_denorm_style {
      denorm_indeterminate      = -1,
      denorm_absent             =  0,
      denorm_present            =  1
    };


#ifdef __PRAGMA_ENVIRONMENT
#   pragma __environment __save
#   pragma __environment __header_defaults
#   if defined(__VMS)
#       pragma __extern_model __strict_refdef
#   endif
#endif


#if defined(__DECCXX) && defined(__VMS) && (__CRTL_VER < 70100000)
#pragma message disable dollarusedid
#endif
extern "C" unsigned int read_rnd(void);


//++
//  Create 'public' classes.   The class numeric_limits provides a
//  C++ program with information about the various properties of an
//  implementation's representation of its fundamental types.
//--
    template<class T> class numeric_limits {
    public:
      static const bool is_specialized = false;
      inline static T min() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      inline static T max() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      static const int digits = 0;
      static const int digits10 = 0;
      static const bool is_signed = false;
      static const bool is_integer = false;
      static const bool is_exact = false;
      static const int radix = 0;
      inline static T epsilon() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      inline static T round_error() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static T infinity() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      inline static T quiet_NaN() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      inline static T signaling_NaN() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      inline static T denorm_min() _RWSTD_THROW_SPEC_NULL {return (T) 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = false;
      static const bool is_modulo = false;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
// Define static const template data members. 
//--
template <class T>
    const bool numeric_limits<T>::is_specialized;
template <class T>
    const int numeric_limits<T>::digits;
template <class T>
    const int numeric_limits<T>::digits10;
template <class T>
    const bool numeric_limits<T>::is_signed;
template <class T>  
    const bool numeric_limits<T>::is_integer;
template <class T>
    const bool numeric_limits<T>::is_exact;
template <class T>
    const int numeric_limits<T>::radix;
template <class T>
    const int numeric_limits<T>::min_exponent;
template <class T>
    const int numeric_limits<T>::min_exponent10;
template <class T>
    const int numeric_limits<T>::max_exponent;
template <class T>
    const int numeric_limits<T>::max_exponent10;
template <class T>
    const bool numeric_limits<T>::has_infinity;
template <class T>
    const bool numeric_limits<T>::has_quiet_NaN;
template <class T>
    const bool numeric_limits<T>::has_signaling_NaN;
template <class T>
    const float_denorm_style numeric_limits<T>::has_denorm;
template <class T>
    const bool numeric_limits<T>::has_denorm_loss;
template <class T>
    const bool numeric_limits<T>::is_iec559;
template <class T>
    const bool numeric_limits<T>::is_bounded;
template <class T>
    const bool numeric_limits<T>::is_modulo;
template <class T>
    const bool numeric_limits<T>::traps;
template <class T>
    const bool numeric_limits<T>::tinyness_before;
template <class T>
    const float_round_style numeric_limits<T>::round_style;


//++
//  Bool Specialization
//--
#ifndef _RWSTD_NO_BOOL
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
    class numeric_limits<bool> {
    public:
      static const bool is_specialized = true;
      inline static bool min() _RWSTD_THROW_SPEC_NULL {return false;}
      inline static bool max() _RWSTD_THROW_SPEC_NULL {return true;}
      static const int digits = 1;
      static const int digits10 = 0;
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static int epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static int infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = false;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };
#endif


//++
//  Char Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<char> {
    public:
      static const bool is_specialized = true;
      inline static char min() _RWSTD_THROW_SPEC_NULL {return CHAR_MIN;}
      inline static char max() _RWSTD_THROW_SPEC_NULL {return CHAR_MAX;}
      static const int digits = CHAR_BIT * sizeof(char) - 1;
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<char>::digits/3.321928095);
#endif
      static const bool is_signed = true;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static char epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static char round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static char infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static char quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static char signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static char denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };



//++
//  Signed Char Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<signed char> {
    public:
      static const bool is_specialized = true;
      inline static signed char min() _RWSTD_THROW_SPEC_NULL {return SCHAR_MIN;}
      inline static signed char max() _RWSTD_THROW_SPEC_NULL {return SCHAR_MAX;}
      static const int digits =
             CHAR_BIT * sizeof(signed char) - 1;
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<signed char>::digits/3.321928095);
#endif
      static const bool is_signed = true;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static signed char epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static signed char round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static signed char infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static signed char quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static signed char signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static signed char denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Unsigned Char Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<unsigned char> {
    public:
      static const bool is_specialized = true;
      inline static unsigned char min() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned char max() _RWSTD_THROW_SPEC_NULL {return UCHAR_MAX;}
      static const int digits = 
            CHAR_BIT * sizeof(unsigned char);
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<unsigned char>::digits/3.321928095);
#endif
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static unsigned char epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned char round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static unsigned char infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned char quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned char signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned char denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Wchar_t Specialization
//--
#ifndef _RWSTD_NO_OVERLOAD_WCHAR
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<wchar_t> {
    public:
      static const bool is_specialized = true;
      inline static wchar_t min() _RWSTD_THROW_SPEC_NULL {return WCHAR_MIN;}
      inline static wchar_t max() _RWSTD_THROW_SPEC_NULL {return WCHAR_MAX;}
      static const int digits = CHAR_BIT * sizeof(wchar_t);
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<wchar_t>::digits/3.321928095);
#endif
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static wchar_t epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static wchar_t round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static wchar_t infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static wchar_t quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static wchar_t signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static wchar_t denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };
#endif /*_RWSTD_NO_OVERLOAD_WCHAR*/


//++
//  Short Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<short> {
    public:
      static const bool is_specialized = true;
      inline static short min() _RWSTD_THROW_SPEC_NULL {return SHRT_MIN;}
      inline static short max() _RWSTD_THROW_SPEC_NULL {return SHRT_MAX;}
      static const int digits = CHAR_BIT * sizeof(short) - 1;
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<short>::digits/3.321928095);
#endif
      static const bool is_signed = true;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static short epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static short round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static short infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static short quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static short signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static short denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Int Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<int> {
    public:
      static const bool is_specialized = true;
      inline static int min() _RWSTD_THROW_SPEC_NULL {return INT_MIN;}
      inline static int max() _RWSTD_THROW_SPEC_NULL {return INT_MAX;}
      static const int digits = CHAR_BIT * sizeof(int) - 1;
      static const int digits10 =
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<int>::digits/3.321928095);
#endif
      static const bool is_signed = true;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static int epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static int infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static int denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Long Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<long> {
    public:
      static const bool is_specialized = true;
      inline static long min() _RWSTD_THROW_SPEC_NULL {return LONG_MIN;}
      inline static long max() _RWSTD_THROW_SPEC_NULL {return LONG_MAX;}
      static const int digits = CHAR_BIT * sizeof(long) - 1;
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<long>::digits/3.321928095);
#endif
      static const bool is_signed = true;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static long epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static long infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


#if defined(__DECCXX) && !(defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) && !defined(__CXXLFIX634)
//++
//  Long Long Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<long long> {
    public:
      static const bool is_specialized = true;
      inline static long long min() _RWSTD_THROW_SPEC_NULL {return LONG_MIN;}
      inline static long long max() _RWSTD_THROW_SPEC_NULL {return LONG_MAX;}
      static const int digits = CHAR_BIT * sizeof(long long) - 1;
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<long long>::digits/3.321928095);
#endif
      static const bool is_signed = true;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static long long epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long long round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static long long infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long long quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long long signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long long denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Unsigned Long Long Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<unsigned long long> {
    public:
      static const bool is_specialized = true;
      inline static unsigned long long min() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long long max() _RWSTD_THROW_SPEC_NULL {return ULONG_MAX;}
      static const int digits =
            CHAR_BIT * sizeof(unsigned long long);
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<unsigned long long>::digits/3.321928095);
#endif
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static unsigned long long epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long long round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static unsigned long long infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long long quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long long signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long long denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };
#endif

//++
//  Unsigned Short Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<unsigned short> {
    public:
      static const bool is_specialized = true;
      inline static unsigned short min() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned short max() _RWSTD_THROW_SPEC_NULL {return USHRT_MAX;}
      static const int digits = 
            CHAR_BIT * sizeof(unsigned short);
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<unsigned short>::digits/3.321928095);
#endif
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static unsigned short epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned short round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static unsigned short infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned short quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned short signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned short denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Unsigned Int Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<unsigned int> {
    public:
      static const bool is_specialized = true;
      inline static unsigned int min() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned int max() _RWSTD_THROW_SPEC_NULL {return UINT_MAX;}
      static const int digits =    
            CHAR_BIT * sizeof(unsigned int);
      static const int digits10 =
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<unsigned int>::digits/3.321928095);
#endif
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static unsigned int epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned int round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static unsigned int infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned int quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned int signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned int denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };


//++
//  Unsigned Long Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<unsigned long> {
    public:
      static const bool is_specialized = true;
      inline static unsigned long min() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long max() _RWSTD_THROW_SPEC_NULL {return ULONG_MAX;}
      static const int digits =
            CHAR_BIT * sizeof(unsigned long);
      static const int digits10 = 
#if defined(__DECCXX) && !defined(__DECFIXCXX4287)
            (digits*301)/1000;
#else
            int(numeric_limits<unsigned long>::digits/3.321928095);
#endif
      static const bool is_signed = false;
      static const bool is_integer = true;
      static const bool is_exact = true;
      static const int radix = 2;
      inline static unsigned long epsilon() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long round_error() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const int min_exponent = 0;
      static const int min_exponent10 = 0;
      static const int max_exponent = 0;
      static const int max_exponent10 = 0;
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static unsigned long infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static unsigned long denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
      static const bool is_bounded = true;
      static const bool is_modulo = true;
      static const bool traps = false;
      static const bool tinyness_before = false;
      static const float_round_style round_style = round_toward_zero;
    };



//++
//  Float Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<float> {
    public:
      static const bool is_specialized = true;
      inline static float min() _RWSTD_THROW_SPEC_NULL {return FLT_MIN;}
      inline static float max() _RWSTD_THROW_SPEC_NULL {return FLT_MAX;}
      static const int digits = FLT_MANT_DIG;
      static const int digits10 = FLT_DIG;
      static const bool is_signed = true;
      static const bool is_integer = false;
      static const bool is_exact = false;
      static const int radix = FLT_RADIX;
      inline static float epsilon() _RWSTD_THROW_SPEC_NULL {return FLT_EPSILON;}
      inline static float round_error() _RWSTD_THROW_SPEC_NULL {
          int rounding = __NUMERIC_LIMITS_FLT_ROUNDS;
#if defined(__alpha)
          if (rounding == round_indeterminate)
              rounding = (int)read_rnd();
#endif
          switch (rounding) {
              case round_toward_zero:
              case round_toward_infinity:
              case round_toward_neg_infinity:
                  return 1.0F;
              default: // round to nearest
                  return 0.5F;
          };
      } // end round error 
      static const int min_exponent = FLT_MIN_EXP;
      static const int min_exponent10 = FLT_MIN_10_EXP;
      static const int max_exponent = FLT_MAX_EXP;
      static const int max_exponent10 = FLT_MAX_10_EXP;
#if !defined(_IEEE_FP)
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static float infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static float quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static float signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static float denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
#else // IEEE Conformant Floats
      static const bool has_infinity = true;
      static const bool has_quiet_NaN = true;
      static const bool has_signaling_NaN = true;
      static const float_denorm_style has_denorm = denorm_present;
      static const bool has_denorm_loss = false;
      inline static float infinity() _RWSTD_THROW_SPEC_NULL {return FLT_INFINITY;}
      inline static float quiet_NaN() _RWSTD_THROW_SPEC_NULL {return FLT_QNAN;}
      inline static float signaling_NaN() _RWSTD_THROW_SPEC_NULL {return FLT_SNAN;}
      inline static float denorm_min() _RWSTD_THROW_SPEC_NULL {
      const unsigned short pos_denorm[2] = {0x0001, 0x0000};
          return *(float *)pos_denorm;
      }
      static const bool is_iec559 = true;
#endif
      static const bool is_bounded = true;
      static const bool is_modulo = false;
      static const bool traps = true;
      static const bool tinyness_before = false;
      static const float_round_style round_style = 
            (float_round_style)__NUMERIC_LIMITS_FLT_ROUNDS;
    };


//++
//  Double Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<double> {
    public:
      static const bool is_specialized = true;
      inline static double min() _RWSTD_THROW_SPEC_NULL {return DBL_MIN;}
      inline static double max() _RWSTD_THROW_SPEC_NULL {return DBL_MAX;}
      static const int digits = DBL_MANT_DIG;
      static const int digits10 = DBL_DIG;
      static const bool is_signed = true;
      static const bool is_integer = false;
      static const bool is_exact = false;
      static const int radix = FLT_RADIX;
      inline static double epsilon() _RWSTD_THROW_SPEC_NULL {return DBL_EPSILON;}
      inline static double round_error() _RWSTD_THROW_SPEC_NULL {
          int rounding = __NUMERIC_LIMITS_FLT_ROUNDS;
#if defined(__alpha)
          if (rounding == round_indeterminate)
              rounding = (int)read_rnd();
#endif
          switch (rounding) {
              case round_toward_zero:
              case round_toward_infinity:
              case round_toward_neg_infinity:
                  return 1.0F;
              default: // round to nearest
                  return 0.5F;
          };
      } // end round_error
      static const int min_exponent = DBL_MIN_EXP;
      static const int min_exponent10 = DBL_MIN_10_EXP;
      static const int max_exponent = DBL_MAX_EXP;
      static const int max_exponent10 = DBL_MAX_10_EXP;
#if !defined(_IEEE_FP)
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static double infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static double quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static double signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static double denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
#else // IEEE Conformant Doubles
      static const bool has_infinity = true;
      static const bool has_quiet_NaN = true;
      static const bool has_signaling_NaN = true;
      static const float_denorm_style has_denorm = denorm_present;
      static const bool has_denorm_loss = false;
      inline static double infinity() _RWSTD_THROW_SPEC_NULL {return DBL_INFINITY;}
      inline static double quiet_NaN() _RWSTD_THROW_SPEC_NULL {return DBL_QNAN;}
      inline static double signaling_NaN() _RWSTD_THROW_SPEC_NULL {return DBL_SNAN;}
      inline static double denorm_min() _RWSTD_THROW_SPEC_NULL {
          const unsigned int pos_denorm[2] = {0x00000001, 0x00000000};
          return *(double *)pos_denorm;
      }
      static const bool is_iec559 = true;
#endif
      static const bool is_bounded = true;
      static const bool is_modulo = false;
      static const bool traps = true;
      static const bool tinyness_before = false;
      static const float_round_style round_style =
           (float_round_style)__NUMERIC_LIMITS_FLT_ROUNDS;
    };


//++
//  Long Double Specialization
//--
#if defined(__DECCXX) && !defined(__DECFIXCXXL508)
template <>
#endif
class numeric_limits<long double> {
    public:
      static const bool is_specialized = true;
      inline static long double min() _RWSTD_THROW_SPEC_NULL {return LDBL_MIN;}
      inline static long double max() _RWSTD_THROW_SPEC_NULL {return LDBL_MAX;}
      static const int digits = LDBL_MANT_DIG;
      static const int digits10 = LDBL_DIG;
      static const bool is_signed = true;
      static const bool is_integer = false;
      static const bool is_exact = false;
      static const int radix = FLT_RADIX;
      inline static long double epsilon() _RWSTD_THROW_SPEC_NULL {return LDBL_EPSILON;}
      inline static long double round_error() _RWSTD_THROW_SPEC_NULL {
          int rounding = __NUMERIC_LIMITS_FLT_ROUNDS;
#if defined(__alpha)      
          if (rounding == round_indeterminate)
              rounding = (int)read_rnd();
#endif
          switch (rounding) {
              case round_toward_zero:
              case round_toward_infinity:
              case round_toward_neg_infinity:
                  return 1.0F;
              default: // round to nearest
                  return 0.5F;
          };
      } // end round error
      static const int min_exponent = LDBL_MIN_EXP;
      static const int min_exponent10 = LDBL_MIN_10_EXP;
      static const int max_exponent = LDBL_MAX_EXP;
      static const int max_exponent10 = LDBL_MAX_10_EXP;
#if !defined(_IEEE_FP)
      static const bool has_infinity = false;
      static const bool has_quiet_NaN = false;
      static const bool has_signaling_NaN = false;
      static const float_denorm_style has_denorm = denorm_absent;
      static const bool has_denorm_loss = false;
      inline static long double infinity() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long double quiet_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long double signaling_NaN() _RWSTD_THROW_SPEC_NULL {return 0;}
      inline static long double denorm_min() _RWSTD_THROW_SPEC_NULL {return 0;}
      static const bool is_iec559 = false;
#else // IEEE Conformant Long Doubles
      static const bool has_infinity = true;
      static const bool has_quiet_NaN = true;
      static const bool has_signaling_NaN = true;
      static const float_denorm_style has_denorm = denorm_present;
      static const bool has_denorm_loss = false;
      inline static long double infinity() _RWSTD_THROW_SPEC_NULL {return LDBL_INFINITY;}
#if __X_FLOAT && defined(__osf__)
      inline static long double quiet_NaN() _RWSTD_THROW_SPEC_NULL {return LDBL_QNAN;}
      inline static long double signaling_NaN() _RWSTD_THROW_SPEC_NULL {return LDBL_SNAN;}
#else
      inline static long double quiet_NaN() _RWSTD_THROW_SPEC_NULL {return DBL_QNAN;}
      inline static long double signaling_NaN() _RWSTD_THROW_SPEC_NULL {return DBL_SNAN;}
#endif
      inline static long double denorm_min() _RWSTD_THROW_SPEC_NULL {
          const unsigned int pos_denorm[2] = {0x00000001, 0x00000000};
          return *(long double *)pos_denorm;
      }
      static const bool is_iec559 = true;
#endif
      static const bool is_bounded = true;
      static const bool is_modulo = false;
      static const bool traps = true;
      static const bool tinyness_before = false;
      static const float_round_style round_style = 
            (float_round_style)__NUMERIC_LIMITS_FLT_ROUNDS;
    };


#if defined(__DECCXX) && defined(__VMS) && (__CRTL_VER < 70100000)
#pragma message enable dollarusedid
#endif


#ifdef __PRAGMA_ENVIRONMENT
#   pragma __environment __restore
#endif


#ifndef _RWSTD_NO_NAMESPACE
}
#endif

#endif // __STD_LIMITS
