27 #ifdef DUNE_CLASSNAME_HH
28 #error "Due to some trickery required for the linker, this file must be included _before_ Dune's classname.hh!"
31 #if !defined EWOMS_QUAD_HH && HAVE_QUAD
34 #include <opm/material/common/ClassName.hpp>
40 #include <type_traits>
46 typedef __float128 quad;
52 class numeric_limits<quad>
55 static const bool is_specialized =
true;
57 static quad min() throw()
58 {
return FLT128_MIN; }
59 static quad max() throw()
60 {
return FLT128_MAX; }
63 static const int digits = FLT128_MANT_DIG;
65 static const int digits10 = FLT128_DIG;
66 static const bool is_signed =
true;
67 static const bool is_integer =
false;
68 static const bool is_exact =
false;
69 static const int radix = 0;
70 static quad epsilon() throw()
71 {
return FLT128_EPSILON; }
72 static quad round_error() throw()
75 static const int min_exponent = FLT128_MIN_EXP;
76 static const int min_exponent10 = FLT128_MIN_10_EXP;
77 static const int max_exponent = FLT128_MAX_EXP;
78 static const int max_exponent10 = FLT128_MAX_10_EXP;
80 static const bool has_infinity =
true;
81 static const bool has_quiet_NaN =
true;
82 static const bool has_signaling_NaN =
true;
83 static const float_denorm_style has_denorm = denorm_present;
84 static const bool has_denorm_loss =
false;
85 static quad infinity() throw()
86 {
return __builtin_huge_valq(); }
87 static quad quiet_NaN() throw()
88 {
return __builtin_nan(
""); }
89 static quad signaling_NaN() throw()
90 {
return __builtin_nans(
""); }
91 static quad denorm_min() throw()
92 {
return FLT128_DENORM_MIN; }
94 static const bool is_iec559 =
true;
95 static const bool is_bounded =
true;
96 static const bool is_modulo =
false;
98 static const bool traps = std::numeric_limits<double>::traps;
99 static const bool tinyness_before = std::numeric_limits<double>::tinyness_before;
100 static const float_round_style round_style = round_to_nearest;
105 struct is_floating_point<quad>
106 :
public integral_constant<bool, true>
110 struct is_arithmetic<quad>
111 :
public integral_constant<bool, true>
115 struct is_fundamental<quad>
116 :
public integral_constant<bool, true>
120 struct is_scalar<quad>
121 :
public integral_constant<bool, true>
126 :
public integral_constant<bool, true>
130 struct is_signed<quad>
131 :
public integral_constant<bool, true>
136 struct is_standard_layout<quad>
137 :
public integral_constant<bool, true>
141 struct is_trivial<quad>
142 :
public integral_constant<bool, true>
152 template <
class OtherType>
153 struct is_assignable<quad, OtherType>
154 :
public integral_constant<bool, is_arithmetic<OtherType>::value>
157 template <
class OtherType>
158 struct is_nothrow_assignable<quad, OtherType>
159 :
public is_assignable<quad, OtherType>
170 struct is_copy_assignable<quad>
171 :
public integral_constant<bool, true>
175 struct is_nothrow_copy_assignable<quad>
176 :
public integral_constant<bool, true>
180 struct is_move_assignable<quad>
181 :
public integral_constant<bool, true>
185 struct is_nothrow_move_assignable<quad>
186 :
public integral_constant<bool, true>
190 struct is_constructible<quad>
191 :
public integral_constant<bool, true>
195 struct is_nothrow_constructible<quad>
196 :
public integral_constant<bool, true>
200 struct is_default_constructible<quad>
201 :
public integral_constant<bool, true>
205 struct is_nothrow_default_constructible<quad>
206 :
public integral_constant<bool, true>
217 struct is_copy_constructible<quad>
218 :
public integral_constant<bool, true>
222 struct is_move_constructible<quad>
223 :
public integral_constant<bool, true>
227 struct is_nothrow_move_constructible<quad>
228 :
public integral_constant<bool, true>
233 struct is_destructible<quad>
234 :
public integral_constant<bool, true>
238 struct is_nothrow_destructible<quad>
239 :
public integral_constant<bool, true>
242 template <
class OtherType>
243 struct is_convertible<quad, OtherType>
244 :
public is_arithmetic<OtherType>
247 inline std::ostream &operator<<(std::ostream &os,
const quad &val)
248 {
return (os <<
double(val)); }
250 inline std::istream &operator>>(std::istream &is, quad &val)
253 std::istream &ret = (is >> tmp);
258 inline quad abs(quad val)
259 {
return (val < 0) ? -val : val; }
261 inline quad floor(quad val)
262 {
return floorq(val); }
264 inline quad ceil(quad val)
265 {
return ceilq(val); }
267 inline quad max(quad a, quad b)
268 {
return (a > b) ? a : b; }
270 inline quad min(quad a, quad b)
271 {
return (a < b) ? a : b; }
273 inline quad sqrt(quad val)
274 {
return sqrtq(val); }
276 template <
class ExpType>
277 inline quad pow(quad base, ExpType exp)
278 {
return powq(base, exp); }
280 inline quad exp(quad val)
281 {
return expq(val); }
283 inline quad log(quad val)
284 {
return logq(val); }
286 inline quad sin(quad val)
287 {
return sinq(val); }
289 inline quad cos(quad val)
290 {
return cosq(val); }
292 inline quad tan(quad val)
293 {
return tanq(val); }
295 inline quad atan(quad val)
296 {
return atanq(val); }
298 inline quad atan2(quad a, quad b)
299 {
return atan2q(a, b); }
301 inline bool isfinite(quad val)
302 {
return !isnanq(val) && !isinfq(val); }
304 inline bool isnan(quad val)
305 {
return isnanq(val); }
307 inline bool isinf(quad val)
308 {
return isinfq(val); }
314 #define DUNE_CLASSNAME_HH
317 std::string className()
318 {
return Opm::className<T>(); }
321 std::string className(
const T &)
322 {
return Opm::className<T>(); }
325 #endif // EWOMS_QUAD_HH
Definition: cartesianindexmapper.hh:31