3 #ifndef DUNE_GMPFIELD_HH
4 #define DUNE_GMPFIELD_HH
12 #include <type_traits>
14 #if HAVE_GMP || DOXYGEN
28 template<
unsigned int precision >
32 typedef mpf_class Base;
57 typename EnableIf =
typename std::enable_if<
58 std::is_convertible<T, mpf_class>::value>::type
65 operator double ()
const
72 template <
unsigned int precision>
74 :
public std::integral_constant<bool, true> {
77 template<
unsigned int precision1,
unsigned int precision2 >
83 template<
unsigned int precision >
89 template<
unsigned int precision,
class T >
95 template<
class T,
unsigned int precision >
Compute type of the result of an arithmetic operation involving two different number types.
Traits for type conversions and type information.
Dune namespace.
Definition: alignedallocator.hh:11
Number class for high precision floating point number using the GMP library mpf_class implementation.
Definition: gmpfield.hh:31
GMPField(const T &v)
initialize from a compatible scalar type
Definition: gmpfield.hh:60
GMPField()
Definition: gmpfield.hh:36
GMPField(const std::string &str)
initialize from a string
Definition: gmpfield.hh:50
GMPField(const char *str)
initialize from a string
Definition: gmpfield.hh:43
GMPField< precision > PromotedType
Definition: gmpfield.hh:86
GMPField< precision > PromotedType
Definition: gmpfield.hh:92
GMPField< precision > PromotedType
Definition: gmpfield.hh:98
Compute type of the result of an arithmetic operation involving two different number types.
Definition: promotiontraits.hh:25
Whether this type acts as a scalar in the context of (hierarchically blocked) containers.
Definition: typetraits.hh:194