Lines Matching refs:mpreal

16 #include <mpreal.h>
32 …* You can find a copy of MPFR C++ that is known to be compatible in the unsupported/test/mpreal fo…
45 mpreal::set_default_prec(256);
47 typedef Matrix<mpreal,Dynamic,Dynamic> MatrixXmp;
48 typedef Matrix<mpreal,Dynamic,1> VectorXmp;
62 template<> struct NumTraits<mpfr::mpreal>
63 : GenericNumTraits<mpfr::mpreal>
75 typedef mpfr::mpreal Real;
76 typedef mpfr::mpreal NonInteger;
78 …static inline Real highest (long Precision = mpfr::mpreal::get_default_prec()) { return mpfr::ma…
79 …static inline Real lowest (long Precision = mpfr::mpreal::get_default_prec()) { return -mpfr::ma…
82 …static inline Real Pi (long Precision = mpfr::mpreal::get_default_prec()) { return mpfr::con…
83 …static inline Real Euler (long Precision = mpfr::mpreal::get_default_prec()) { return mpfr::con…
84 …static inline Real Log2 (long Precision = mpfr::mpreal::get_default_prec()) { return mpfr::con…
85 …static inline Real Catalan (long Precision = mpfr::mpreal::get_default_prec()) { return mpfr::con…
87 …static inline Real epsilon (long Precision = mpfr::mpreal::get_default_prec()) { return mpfr::mac…
91 …static inline int digits10 (long Precision = mpfr::mpreal::get_default_prec()) { return std::nume…
97 mpfr_prec_t weak_prec = ((mpfr::mpreal::get_default_prec()-1) * 90) / 100;
104 template<> inline mpfr::mpreal random<mpfr::mpreal>()
109 template<> inline mpfr::mpreal random<mpfr::mpreal>(const mpfr::mpreal& a, const mpfr::mpreal& b)
111 return a + (b-a) * random<mpfr::mpreal>();
114 …inline bool isMuchSmallerThan(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& ep…
119 inline bool isApprox(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)
124 …inline bool isApproxOrLessThan(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& e…
129 template<> inline long double cast<mpfr::mpreal,long double>(const mpfr::mpreal& x)
132 template<> inline double cast<mpfr::mpreal,double>(const mpfr::mpreal& x)
135 template<> inline long cast<mpfr::mpreal,long>(const mpfr::mpreal& x)
138 template<> inline int cast<mpfr::mpreal,int>(const mpfr::mpreal& x)
141 // Specialize GEBP kernel and traits for mpreal (no need for peeling, nor complicated stuff)
142 …// This also permits to directly call mpfr's routines and avoid many temporaries produced by mpreal
144 class gebp_traits<mpfr::mpreal, mpfr::mpreal, false, false>
147 typedef mpfr::mpreal ResScalar;
168 struct gebp_kernel<mpfr::mpreal,mpfr::mpreal,Index,DataMapper,1,1,ConjugateLhs,ConjugateRhs>
170 typedef mpfr::mpreal mpreal;
173 void operator()(const DataMapper& res, const mpreal* blockA, const mpreal* blockB,
174 Index rows, Index depth, Index cols, const mpreal& alpha,
180 mpreal acc1(0,mpfr_get_prec(blockA[0].mpfr_srcptr())),
190 const mpreal *A = blockA + i*strideA + offsetA;
191 const mpreal *B = blockB + j*strideB + offsetB;
196 … mpfr_mul(tmp.mpfr_ptr(), A[k].mpfr_srcptr(), B[k].mpfr_srcptr(), mpreal::get_default_rnd());
197 … mpfr_add(acc1.mpfr_ptr(), acc1.mpfr_ptr(), tmp.mpfr_ptr(), mpreal::get_default_rnd());
200 … mpfr_mul(acc1.mpfr_ptr(), acc1.mpfr_srcptr(), alpha.mpfr_srcptr(), mpreal::get_default_rnd());
201 …mpfr_add(res(i,j).mpfr_ptr(), res(i,j).mpfr_srcptr(), acc1.mpfr_srcptr(), mpreal::get_default_rnd…