1 #ifndef _GLUCAT_PROMOTION_H 2 #define _GLUCAT_PROMOTION_H 41 #if defined(_GLUCAT_USE_QD) 42 # include <qd/qd_real.h> 50 #if !defined(_GLUCAT_USE_QD) || !defined(QD_API) 52 # if DBL_MANT_DIG < LDBL_MANT_DIG 57 numeric_traits<double>::
58 promoted {
using type =
long double;};
63 numeric_traits<long double>::
64 demoted {
using type = double;};
72 promoted {
using type = double;};
78 demoted {
using type = float;};
80 # endif // DBL_MANT_DIG < LDBL_MANT_DIG 86 promoted {
using type =
long double;};
90 # if (DBL_MANT_DIG < LDBL_MANT_DIG) && (LDBL_MANT_DIG < DBL_MANT_DIG*2) 96 promoted {
using type =
long double;};
102 demoted {
using type = double;};
107 numeric_traits<long double>::
108 promoted {
using type = dd_real;};
113 numeric_traits<dd_real>::
114 demoted {
using type =
long double;};
119 numeric_traits<dd_real>::
120 promoted {
using type = qd_real;};
125 numeric_traits<qd_real>::
126 demoted {
using type = dd_real;};
128 # elif (LDBL_MANT_DIG < DBL_MANT_DIG*2) 133 numeric_traits<double>::
134 promoted {
using type = dd_real;};
139 numeric_traits<long double>::
140 demoted {
using type = float;};
145 numeric_traits<long double>::
146 promoted {
using type = dd_real;};
151 numeric_traits<dd_real>::
152 demoted {
using type = double;};
157 numeric_traits<dd_real>::
158 promoted {
using type = qd_real;};
163 numeric_traits<qd_real>::
164 demoted {
using type = dd_real;};
171 numeric_traits<double>::
172 promoted {
using type = dd_real;};
177 numeric_traits<dd_real>::
178 demoted {
using type = double;};
183 numeric_traits<dd_real>::
184 promoted {
using type =
long double;};
189 numeric_traits<long double>::
190 demoted {
using type = dd_real;};
195 numeric_traits<long double>::
196 promoted {
using type = qd_real;};
201 numeric_traits<qd_real>::
202 demoted {
using type =
long double;};
204 # endif // (DBL_MANT_DIG < LDBL_MANT_DIG) && (LDBL_MANT_DIG < DBL_MANT_DIG*2) 209 numeric_traits<qd_real>::
210 promoted {
using type = qd_real;};
212 #endif // !defined(_GLUCAT_USE_QD) || !defined(QD_API) 216 #endif // _GLUCAT_PROMOTION_H
Extra traits which extend numeric limits.