5#ifndef DUNE_GMPFIELD_HH
6#define DUNE_GMPFIELD_HH
16#if HAVE_GMP || DOXYGEN
30 template<
unsigned int precision >
34 typedef mpf_class Base;
59 typename EnableIf =
typename std::enable_if<
60 std::is_convertible<T, mpf_class>::value>::type
67 operator double ()
const
74 template <
unsigned int precision>
75 struct IsNumber<GMPField<precision>>
76 :
public std::integral_constant<bool, true> {
79 template<
unsigned int precision1,
unsigned int precision2 >
80 struct PromotionTraits<GMPField<precision1>, GMPField<precision2>>
82 typedef GMPField<(precision1 > precision2 ? precision1 : precision2)> PromotedType;
85 template<
unsigned int precision >
86 struct PromotionTraits<GMPField<precision>,GMPField<precision>>
88 typedef GMPField<precision> PromotedType;
91 template<
unsigned int precision,
class T >
92 struct PromotionTraits<GMPField<precision>, T>
94 typedef GMPField<precision> PromotedType;
97 template<
class T,
unsigned int precision >
98 struct PromotionTraits<T, GMPField<precision>>
100 typedef GMPField<precision> PromotedType;
Number class for high precision floating point number using the GMP library mpf_class implementation.
Definition: gmpfield.hh:33
GMPField(const T &v)
initialize from a compatible scalar type
Definition: gmpfield.hh:62
GMPField()
Definition: gmpfield.hh:38
GMPField(const std::string &str)
initialize from a string
Definition: gmpfield.hh:52
GMPField(const char *str)
initialize from a string
Definition: gmpfield.hh:45
Traits for type conversions and type information.
Dune namespace.
Definition: alignedallocator.hh:13