Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:36

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // Copyright Christopher Kormanyos 2014.
0003 // Copyright John Maddock 2014.
0004 // Copyright Paul Bristow 2014.
0005 // Distributed under the Boost Software License,
0006 // Version 1.0. (See accompanying file LICENSE_1_0.txt
0007 // or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 
0010 // Implement the types for floating-point typedefs having specified widths.
0011 
0012 #ifndef BOOST_MATH_CSTDFLOAT_TYPES_2014_01_09_HPP_
0013   #define BOOST_MATH_CSTDFLOAT_TYPES_2014_01_09_HPP_
0014 
0015   #include <cfloat>
0016   #include <limits>
0017   #include <boost/math/tools/config.hpp>
0018 
0019   // This is the beginning of the preamble.
0020 
0021   // In this preamble, the preprocessor is used to query certain
0022   // preprocessor definitions from <cfloat>. Based on the results
0023   // of these queries, an attempt is made to automatically detect
0024   // the presence of built-in floating-point types having specified
0025   // widths. These are *thought* to be conformant with IEEE-754,
0026   // whereby an unequivocal test based on std::numeric_limits<>
0027   // follows below.
0028 
0029   // In addition, various macros that are used for initializing
0030   // floating-point literal values having specified widths and
0031   // some basic min/max values are defined.
0032 
0033   // First, we will pre-load certain preprocessor definitions
0034   // with a dummy value.
0035 
0036   #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH  0
0037 
0038   #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE  0
0039   #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE  0
0040   #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE  0
0041   #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE  0
0042   #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0
0043 
0044   // Ensure that the compiler has a radix-2 floating-point representation.
0045   #if (!defined(FLT_RADIX) || ((defined(FLT_RADIX) && (FLT_RADIX != 2))))
0046     #error The compiler does not support any radix-2 floating-point types required for <boost/cstdfloat.hpp>.
0047   #endif
0048 
0049   // Check if built-in float is equivalent to float16_t, float32_t, float64_t, float80_t, or float128_t.
0050   #if(defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP))
0051     #if  ((FLT_MANT_DIG == 11) && (FLT_MAX_EXP == 16) && (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0))
0052       #define BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE float
0053       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0054       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 16
0055       #undef  BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE
0056       #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE  1
0057       #define BOOST_FLOAT16_C(x)  (x ## F)
0058       #define BOOST_CSTDFLOAT_FLOAT_16_MIN  FLT_MIN
0059       #define BOOST_CSTDFLOAT_FLOAT_16_MAX  FLT_MAX
0060     #elif((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0))
0061       #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float
0062       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0063       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32
0064       #undef  BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE
0065       #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE  1
0066       #define BOOST_FLOAT32_C(x)  (x ## F)
0067       #define BOOST_CSTDFLOAT_FLOAT_32_MIN  FLT_MIN
0068       #define BOOST_CSTDFLOAT_FLOAT_32_MAX  FLT_MAX
0069     #elif((FLT_MANT_DIG == 53) && (FLT_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0))
0070       #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float
0071       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0072       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64
0073       #undef  BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE
0074       #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE  1
0075       #define BOOST_FLOAT64_C(x)  (x ## F)
0076       #define BOOST_CSTDFLOAT_FLOAT_64_MIN  FLT_MIN
0077       #define BOOST_CSTDFLOAT_FLOAT_64_MAX  FLT_MAX
0078     #elif((FLT_MANT_DIG == 64) && (FLT_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0))
0079       #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float
0080       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0081       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80
0082       #undef  BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE
0083       #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE  1
0084       #define BOOST_FLOAT80_C(x)  (x ## F)
0085       #define BOOST_CSTDFLOAT_FLOAT_80_MIN  FLT_MIN
0086       #define BOOST_CSTDFLOAT_FLOAT_80_MAX  FLT_MAX
0087     #elif((FLT_MANT_DIG == 113) && (FLT_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0))
0088       #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float
0089       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0090       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128
0091       #undef  BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE
0092       #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE  1
0093       #define BOOST_FLOAT128_C(x)  (x ## F)
0094       #define BOOST_CSTDFLOAT_FLOAT_128_MIN  FLT_MIN
0095       #define BOOST_CSTDFLOAT_FLOAT_128_MAX  FLT_MAX
0096     #endif
0097   #endif
0098 
0099   // Check if built-in double is equivalent to float16_t, float32_t, float64_t, float80_t, or float128_t.
0100   #if(defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP))
0101     #if  ((DBL_MANT_DIG == 11) && (DBL_MAX_EXP == 16) && (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0))
0102       #define BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE double
0103       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0104       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 16
0105       #undef  BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE
0106       #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE  1
0107       #define BOOST_FLOAT16_C(x)  (x)
0108       #define BOOST_CSTDFLOAT_FLOAT_16_MIN  DBL_MIN
0109       #define BOOST_CSTDFLOAT_FLOAT_16_MAX  DBL_MAX
0110     #elif((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0))
0111       #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double
0112       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0113       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32
0114       #undef  BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE
0115       #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE  1
0116       #define BOOST_FLOAT32_C(x)  (x)
0117       #define BOOST_CSTDFLOAT_FLOAT_32_MIN  DBL_MIN
0118       #define BOOST_CSTDFLOAT_FLOAT_32_MAX  DBL_MAX
0119     #elif((DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0))
0120       #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double
0121       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0122       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64
0123       #undef  BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE
0124       #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE  1
0125       #define BOOST_FLOAT64_C(x)  (x)
0126       #define BOOST_CSTDFLOAT_FLOAT_64_MIN  DBL_MIN
0127       #define BOOST_CSTDFLOAT_FLOAT_64_MAX  DBL_MAX
0128     #elif((DBL_MANT_DIG == 64) && (DBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0))
0129       #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE double
0130       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0131       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80
0132       #undef  BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE
0133       #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE  1
0134       #define BOOST_FLOAT80_C(x)  (x)
0135       #define BOOST_CSTDFLOAT_FLOAT_80_MIN  DBL_MIN
0136       #define BOOST_CSTDFLOAT_FLOAT_80_MAX  DBL_MAX
0137     #elif((DBL_MANT_DIG == 113) && (DBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0))
0138       #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE double
0139       #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0140       #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128
0141       #undef  BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE
0142       #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE  1
0143       #define BOOST_FLOAT128_C(x)  (x)
0144       #define BOOST_CSTDFLOAT_FLOAT_128_MIN  DBL_MIN
0145       #define BOOST_CSTDFLOAT_FLOAT_128_MAX  DBL_MAX
0146     #endif
0147   #endif
0148 
0149   // Disable check long double capability even if supported by compiler since some math runtime
0150   // implementations are broken for long double.
0151   #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
0152     // Check if built-in long double is equivalent to float16_t, float32_t, float64_t, float80_t, or float128_t.
0153     #if(defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP))
0154       #if  ((LDBL_MANT_DIG == 11) && (LDBL_MAX_EXP == 16) && (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0))
0155         #define BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE long double
0156         #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0157         #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 16
0158         #undef  BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE
0159         #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE  1
0160         #define BOOST_FLOAT16_C(x)  (x ## L)
0161         #define BOOST_CSTDFLOAT_FLOAT_16_MIN  LDBL_MIN
0162         #define BOOST_CSTDFLOAT_FLOAT_16_MAX  LDBL_MAX
0163       #elif((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0))
0164         #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double
0165         #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0166         #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32
0167         #undef  BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE
0168         #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE  1
0169         #define BOOST_FLOAT32_C(x)  (x ## L)
0170         #define BOOST_CSTDFLOAT_FLOAT_32_MIN  LDBL_MIN
0171         #define BOOST_CSTDFLOAT_FLOAT_32_MAX  LDBL_MAX
0172       #elif((LDBL_MANT_DIG == 53) && (LDBL_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0))
0173         #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE long double
0174         #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0175         #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64
0176         #undef  BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE
0177         #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE  1
0178         #define BOOST_FLOAT64_C(x)  (x ## L)
0179         #define BOOST_CSTDFLOAT_FLOAT_64_MIN  LDBL_MIN
0180         #define BOOST_CSTDFLOAT_FLOAT_64_MAX  LDBL_MAX
0181       #elif((LDBL_MANT_DIG == 64) && (LDBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0))
0182         #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double
0183         #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0184         #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80
0185         #undef  BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE
0186         #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE  1
0187         #define BOOST_FLOAT80_C(x)  (x ## L)
0188         #define BOOST_CSTDFLOAT_FLOAT_80_MIN  LDBL_MIN
0189         #define BOOST_CSTDFLOAT_FLOAT_80_MAX  LDBL_MAX
0190       #elif((LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0))
0191         #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double
0192         #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0193         #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128
0194         #undef  BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE
0195         #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE  1
0196         #define BOOST_FLOAT128_C(x)  (x ## L)
0197         #define BOOST_CSTDFLOAT_FLOAT_128_MIN  LDBL_MIN
0198         #define BOOST_CSTDFLOAT_FLOAT_128_MAX  LDBL_MAX
0199       #endif
0200     #endif
0201   #endif
0202 
0203   // Check if quadruple-precision is supported. Here, we are checking
0204   // for the presence of __float128 from GCC's quadmath.h or _Quad
0205   // from ICC's /Qlong-double flag). To query these, we use the
0206   // BOOST_MATH_USE_FLOAT128 pre-processor definition from
0207   // <boost/math/tools/config.hpp>.
0208 
0209   #if (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT)
0210 
0211     // Specify the underlying name of the internal 128-bit floating-point type definition.
0212     namespace boost { namespace math { namespace cstdfloat { namespace detail {
0213     #if defined(__GNUC__)
0214       typedef __float128      float_internal128_t;
0215     #elif defined(__INTEL_COMPILER)
0216       typedef _Quad           float_internal128_t;
0217     #else
0218       #error "Sorry, the compiler is neither GCC, nor Intel, I don't know how to configure <boost/cstdfloat.hpp>."
0219     #endif
0220     } } } } // boost::math::cstdfloat::detail
0221 
0222     #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE boost::math::cstdfloat::detail::float_internal128_t
0223     #undef  BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0224     #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128
0225     #undef  BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE
0226     #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE  1
0227     #define BOOST_FLOAT128_C(x)  (x ## Q)
0228     #define BOOST_CSTDFLOAT_FLOAT128_MIN  3.36210314311209350626267781732175260e-4932Q
0229     #define BOOST_CSTDFLOAT_FLOAT128_MAX  1.18973149535723176508575932662800702e+4932Q
0230     #define BOOST_CSTDFLOAT_FLOAT128_EPS  1.92592994438723585305597794258492732e-0034Q
0231     #define BOOST_CSTDFLOAT_FLOAT128_DENORM_MIN  6.475175119438025110924438958227646552e-4966Q
0232 
0233   #endif // Not BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT (i.e., the user would like to have libquadmath support)
0234 
0235   // This is the end of the preamble, and also the end of the
0236   // sections providing support for the C++ standard library
0237   // for quadruple-precision.
0238 
0239   // Now we use the results of the queries that have been obtained
0240   // in the preamble (far above) for the final type definitions in
0241   // the namespace boost.
0242 
0243   // Make sure that the compiler has any floating-point type(s) whatsoever.
0244   #if (   (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE  == 0)  \
0245        && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE  == 0)  \
0246        && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE  == 0)  \
0247        && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE  == 0)  \
0248        && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0))
0249     #error The compiler does not support any of the floating-point types required for <boost/cstdfloat.hpp>.
0250   #endif
0251 
0252   // The following section contains the various min/max macros
0253   // for the *leastN and *fastN types.
0254 
0255   #if(BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 1)
0256     #define BOOST_FLOAT_FAST16_MIN   BOOST_CSTDFLOAT_FLOAT_16_MIN
0257     #define BOOST_FLOAT_LEAST16_MIN  BOOST_CSTDFLOAT_FLOAT_16_MIN
0258     #define BOOST_FLOAT_FAST16_MAX   BOOST_CSTDFLOAT_FLOAT_16_MAX
0259     #define BOOST_FLOAT_LEAST16_MAX  BOOST_CSTDFLOAT_FLOAT_16_MAX
0260   #endif
0261 
0262   #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1)
0263     #define BOOST_FLOAT_FAST32_MIN   BOOST_CSTDFLOAT_FLOAT_32_MIN
0264     #define BOOST_FLOAT_LEAST32_MIN  BOOST_CSTDFLOAT_FLOAT_32_MIN
0265     #define BOOST_FLOAT_FAST32_MAX   BOOST_CSTDFLOAT_FLOAT_32_MAX
0266     #define BOOST_FLOAT_LEAST32_MAX  BOOST_CSTDFLOAT_FLOAT_32_MAX
0267   #endif
0268 
0269   #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1)
0270     #define BOOST_FLOAT_FAST64_MIN   BOOST_CSTDFLOAT_FLOAT_64_MIN
0271     #define BOOST_FLOAT_LEAST64_MIN  BOOST_CSTDFLOAT_FLOAT_64_MIN
0272     #define BOOST_FLOAT_FAST64_MAX   BOOST_CSTDFLOAT_FLOAT_64_MAX
0273     #define BOOST_FLOAT_LEAST64_MAX  BOOST_CSTDFLOAT_FLOAT_64_MAX
0274   #endif
0275 
0276   #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1)
0277     #define BOOST_FLOAT_FAST80_MIN   BOOST_CSTDFLOAT_FLOAT_80_MIN
0278     #define BOOST_FLOAT_LEAST80_MIN  BOOST_CSTDFLOAT_FLOAT_80_MIN
0279     #define BOOST_FLOAT_FAST80_MAX   BOOST_CSTDFLOAT_FLOAT_80_MAX
0280     #define BOOST_FLOAT_LEAST80_MAX  BOOST_CSTDFLOAT_FLOAT_80_MAX
0281   #endif
0282 
0283   #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1)
0284     #define BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T
0285 
0286     #define BOOST_FLOAT_FAST128_MIN   BOOST_CSTDFLOAT_FLOAT_128_MIN
0287     #define BOOST_FLOAT_LEAST128_MIN  BOOST_CSTDFLOAT_FLOAT_128_MIN
0288     #define BOOST_FLOAT_FAST128_MAX   BOOST_CSTDFLOAT_FLOAT_128_MAX
0289     #define BOOST_FLOAT_LEAST128_MAX  BOOST_CSTDFLOAT_FLOAT_128_MAX
0290   #endif
0291 
0292   // The following section contains the various min/max macros
0293   // for the *floatmax types.
0294 
0295   #if  (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 16)
0296     #define BOOST_FLOATMAX_C(x) BOOST_FLOAT16_C(x)
0297     #define BOOST_FLOATMAX_MIN  BOOST_CSTDFLOAT_FLOAT_16_MIN
0298     #define BOOST_FLOATMAX_MAX  BOOST_CSTDFLOAT_FLOAT_16_MAX
0299   #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32)
0300     #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x)
0301     #define BOOST_FLOATMAX_MIN  BOOST_CSTDFLOAT_FLOAT_32_MIN
0302     #define BOOST_FLOATMAX_MAX  BOOST_CSTDFLOAT_FLOAT_32_MAX
0303   #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64)
0304     #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x)
0305     #define BOOST_FLOATMAX_MIN  BOOST_CSTDFLOAT_FLOAT_64_MIN
0306     #define BOOST_FLOATMAX_MAX  BOOST_CSTDFLOAT_FLOAT_64_MAX
0307   #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80)
0308     #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x)
0309     #define BOOST_FLOATMAX_MIN  BOOST_CSTDFLOAT_FLOAT_80_MIN
0310     #define BOOST_FLOATMAX_MAX  BOOST_CSTDFLOAT_FLOAT_80_MAX
0311   #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128)
0312     #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x)
0313     #define BOOST_FLOATMAX_MIN  BOOST_CSTDFLOAT_FLOAT_128_MIN
0314     #define BOOST_FLOATMAX_MAX  BOOST_CSTDFLOAT_FLOAT_128_MAX
0315   #else
0316     #error The maximum available floating-point width for <boost/cstdfloat.hpp> is undefined.
0317   #endif
0318 
0319   // And finally..., we define the floating-point typedefs having
0320   // specified widths. The types are defined in the namespace boost.
0321 
0322   // For simplicity, the least and fast types are type defined identically
0323   // as the corresponding fixed-width type. This behavior may, however,
0324   // be modified when being optimized for a given compiler implementation.
0325 
0326   // In addition, a clear assessment of IEEE-754 conformance is carried out
0327   // using compile-time assertion.
0328 
0329   namespace boost
0330   {
0331     #if(BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 1)
0332       typedef BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE float16_t;
0333       typedef boost::float16_t float_fast16_t;
0334       typedef boost::float16_t float_least16_t;
0335 
0336       static_assert(std::numeric_limits<boost::float16_t>::is_iec559    == true, "boost::float16_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0337       static_assert(std::numeric_limits<boost::float16_t>::radix        ==    2, "boost::float16_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0338       static_assert(std::numeric_limits<boost::float16_t>::digits       ==   11, "boost::float16_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0339       static_assert(std::numeric_limits<boost::float16_t>::max_exponent ==   16, "boost::float16_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0340 
0341       #undef BOOST_CSTDFLOAT_FLOAT_16_MIN
0342       #undef BOOST_CSTDFLOAT_FLOAT_16_MAX
0343     #endif
0344 
0345     #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1)
0346       typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float32_t;
0347       typedef boost::float32_t float_fast32_t;
0348       typedef boost::float32_t float_least32_t;
0349 
0350       static_assert(std::numeric_limits<boost::float32_t>::is_iec559    == true, "boost::float32_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0351       static_assert(std::numeric_limits<boost::float32_t>::radix        ==    2, "boost::float32_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0352       static_assert(std::numeric_limits<boost::float32_t>::digits       ==   24, "boost::float32_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0353       static_assert(std::numeric_limits<boost::float32_t>::max_exponent ==  128, "boost::float32_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0354 
0355       #undef BOOST_CSTDFLOAT_FLOAT_32_MIN
0356       #undef BOOST_CSTDFLOAT_FLOAT_32_MAX
0357     #endif
0358 
0359 #if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && defined(__SUNPRO_CC)
0360 #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE
0361 #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0
0362 #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE
0363 #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0
0364 #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0365 #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64
0366 #endif
0367 
0368     #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1)
0369       typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float64_t;
0370       typedef boost::float64_t float_fast64_t;
0371       typedef boost::float64_t float_least64_t;
0372 
0373       static_assert(std::numeric_limits<boost::float64_t>::is_iec559    == true, "boost::float64_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0374       static_assert(std::numeric_limits<boost::float64_t>::radix        ==    2, "boost::float64_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0375       static_assert(std::numeric_limits<boost::float64_t>::digits       ==   53, "boost::float64_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0376       static_assert(std::numeric_limits<boost::float64_t>::max_exponent == 1024, "boost::float64_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0377 
0378       #undef BOOST_CSTDFLOAT_FLOAT_64_MIN
0379       #undef BOOST_CSTDFLOAT_FLOAT_64_MAX
0380     #endif
0381 
0382     #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1)
0383       typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float80_t;
0384       typedef boost::float80_t float_fast80_t;
0385       typedef boost::float80_t float_least80_t;
0386 
0387       static_assert(std::numeric_limits<boost::float80_t>::is_iec559    ==  true, "boost::float80_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0388       static_assert(std::numeric_limits<boost::float80_t>::radix        ==     2, "boost::float80_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0389       static_assert(std::numeric_limits<boost::float80_t>::digits       ==    64, "boost::float80_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0390       static_assert(std::numeric_limits<boost::float80_t>::max_exponent == 16384, "boost::float80_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0391 
0392       #undef BOOST_CSTDFLOAT_FLOAT_80_MIN
0393       #undef BOOST_CSTDFLOAT_FLOAT_80_MAX
0394     #endif
0395 
0396     #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1)
0397       typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float128_t;
0398       typedef boost::float128_t float_fast128_t;
0399       typedef boost::float128_t float_least128_t;
0400 
0401       #if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT)
0402       // This configuration does not *yet* support std::numeric_limits<boost::float128_t>.
0403       // Support for std::numeric_limits<boost::float128_t> is added in the detail
0404       // file <boost/math/cstdfloat/cstdfloat_limits.hpp>.
0405       #else
0406       static_assert(std::numeric_limits<boost::float128_t>::is_iec559    ==  true, "boost::float128_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0407       static_assert(std::numeric_limits<boost::float128_t>::radix        ==     2, "boost::float128_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0408       static_assert(std::numeric_limits<boost::float128_t>::digits       ==   113, "boost::float128_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0409       static_assert(std::numeric_limits<boost::float128_t>::max_exponent == 16384, "boost::float128_t has been detected in <boost/cstdfloat>, but verification with std::numeric_limits fails");
0410       #endif
0411 
0412       #undef BOOST_CSTDFLOAT_FLOAT_128_MIN
0413       #undef BOOST_CSTDFLOAT_FLOAT_128_MAX
0414     #endif
0415 
0416     #if  (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH ==  16)
0417       typedef boost::float16_t  floatmax_t;
0418     #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH ==  32)
0419       typedef boost::float32_t  floatmax_t;
0420     #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH ==  64)
0421       typedef boost::float64_t  floatmax_t;
0422     #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH ==  80)
0423       typedef boost::float80_t  floatmax_t;
0424     #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128)
0425       typedef boost::float128_t floatmax_t;
0426     #else
0427       #error The maximum available floating-point width for <boost/cstdfloat.hpp> is undefined.
0428     #endif
0429 
0430     #undef BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE
0431     #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE
0432     #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE
0433     #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE
0434     #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE
0435 
0436     #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH
0437   }
0438   // namespace boost
0439 
0440 #endif // BOOST_MATH_CSTDFLOAT_BASE_TYPES_2014_01_09_HPP_
0441