Lines Matching refs:mpreal

142 class mpreal {
153 mpreal();
154 mpreal(const mpreal& u);
155 mpreal(const mpf_t u);
156mpreal(const mpz_t u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
157mpreal(const mpq_t u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
158mpreal(const double u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
159mpreal(const long double u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
160mpreal(const unsigned long long int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
161mpreal(const long long int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
162mpreal(const unsigned long int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
163mpreal(const unsigned int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
164mpreal(const long int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
165mpreal(const int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode …
169 mpreal(const mpfr_t u, bool shared = false);
171mpreal(const char* s, mp_prec_t prec = mpreal::get_default_prec(), int base = 10, mp_r…
172mpreal(const std::string& s, mp_prec_t prec = mpreal::get_default_prec(), int base = 10, mp_r…
174 ~mpreal();
177 mpreal& operator=(mpreal&& v);
178 mpreal(mpreal&& u);
188 mpreal& operator=(const mpreal& v);
189 mpreal& operator=(const mpf_t v);
190 mpreal& operator=(const mpz_t v);
191 mpreal& operator=(const mpq_t v);
192 mpreal& operator=(const long double v);
193 mpreal& operator=(const double v);
194 mpreal& operator=(const unsigned long int v);
195 mpreal& operator=(const unsigned long long int v);
196 mpreal& operator=(const long long int v);
197 mpreal& operator=(const unsigned int v);
198 mpreal& operator=(const long int v);
199 mpreal& operator=(const int v);
200 mpreal& operator=(const char* s);
201 mpreal& operator=(const std::string& s);
202 template <typename real_t> mpreal& operator= (const std::complex<real_t>& z);
205 mpreal& operator+=(const mpreal& v);
206 mpreal& operator+=(const mpf_t v);
207 mpreal& operator+=(const mpz_t v);
208 mpreal& operator+=(const mpq_t v);
209 mpreal& operator+=(const long double u);
210 mpreal& operator+=(const double u);
211 mpreal& operator+=(const unsigned long int u);
212 mpreal& operator+=(const unsigned int u);
213 mpreal& operator+=(const long int u);
214 mpreal& operator+=(const int u);
216 mpreal& operator+=(const long long int u);
217 mpreal& operator+=(const unsigned long long int u);
218 mpreal& operator-=(const long long int u);
219 mpreal& operator-=(const unsigned long long int u);
220 mpreal& operator*=(const long long int u);
221 mpreal& operator*=(const unsigned long long int u);
222 mpreal& operator/=(const long long int u);
223 mpreal& operator/=(const unsigned long long int u);
225 const mpreal operator+() const;
226 mpreal& operator++ ();
227 const mpreal operator++ (int);
230 mpreal& operator-=(const mpreal& v);
231 mpreal& operator-=(const mpz_t v);
232 mpreal& operator-=(const mpq_t v);
233 mpreal& operator-=(const long double u);
234 mpreal& operator-=(const double u);
235 mpreal& operator-=(const unsigned long int u);
236 mpreal& operator-=(const unsigned int u);
237 mpreal& operator-=(const long int u);
238 mpreal& operator-=(const int u);
239 const mpreal operator-() const;
240 friend const mpreal operator-(const unsigned long int b, const mpreal& a);
241 friend const mpreal operator-(const unsigned int b, const mpreal& a);
242 friend const mpreal operator-(const long int b, const mpreal& a);
243 friend const mpreal operator-(const int b, const mpreal& a);
244 friend const mpreal operator-(const double b, const mpreal& a);
245 mpreal& operator-- ();
246 const mpreal operator-- (int);
249 mpreal& operator*=(const mpreal& v);
250 mpreal& operator*=(const mpz_t v);
251 mpreal& operator*=(const mpq_t v);
252 mpreal& operator*=(const long double v);
253 mpreal& operator*=(const double v);
254 mpreal& operator*=(const unsigned long int v);
255 mpreal& operator*=(const unsigned int v);
256 mpreal& operator*=(const long int v);
257 mpreal& operator*=(const int v);
260 mpreal& operator/=(const mpreal& v);
261 mpreal& operator/=(const mpz_t v);
262 mpreal& operator/=(const mpq_t v);
263 mpreal& operator/=(const long double v);
264 mpreal& operator/=(const double v);
265 mpreal& operator/=(const unsigned long int v);
266 mpreal& operator/=(const unsigned int v);
267 mpreal& operator/=(const long int v);
268 mpreal& operator/=(const int v);
269 friend const mpreal operator/(const unsigned long int b, const mpreal& a);
270 friend const mpreal operator/(const unsigned int b, const mpreal& a);
271 friend const mpreal operator/(const long int b, const mpreal& a);
272 friend const mpreal operator/(const int b, const mpreal& a);
273 friend const mpreal operator/(const double b, const mpreal& a);
276 mpreal& operator<<=(const unsigned long int u);
277 mpreal& operator<<=(const unsigned int u);
278 mpreal& operator<<=(const long int u);
279 mpreal& operator<<=(const int u);
282 mpreal& operator>>=(const unsigned long int u);
283 mpreal& operator>>=(const unsigned int u);
284 mpreal& operator>>=(const long int u);
285 mpreal& operator>>=(const int u);
317 std::string toString(int n = -1, int b = 10, mp_rnd_t mode = mpreal::get_default_rnd()) const;
326 friend const mpreal sqr (const mpreal& v, mp_rnd_t rnd_mode);
327 friend const mpreal sqrt(const mpreal& v, mp_rnd_t rnd_mode);
328 friend const mpreal sqrt(const unsigned long int v, mp_rnd_t rnd_mode);
329 friend const mpreal cbrt(const mpreal& v, mp_rnd_t rnd_mode);
330 friend const mpreal root(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode);
331 friend const mpreal pow (const mpreal& a, const mpreal& b, mp_rnd_t rnd_mode);
332 friend const mpreal pow (const mpreal& a, const mpz_t b, mp_rnd_t rnd_mode);
333 friend const mpreal pow (const mpreal& a, const unsigned long int b, mp_rnd_t rnd_mode);
334 friend const mpreal pow (const mpreal& a, const long int b, mp_rnd_t rnd_mode);
335 friend const mpreal pow (const unsigned long int a, const mpreal& b, mp_rnd_t rnd_mode);
336 … friend const mpreal pow (const unsigned long int a, const unsigned long int b, mp_rnd_t rnd_mode);
337 friend const mpreal fabs(const mpreal& v, mp_rnd_t rnd_mode);
339 friend const mpreal abs(const mpreal& v, mp_rnd_t rnd_mode);
340 friend const mpreal dim(const mpreal& a, const mpreal& b, mp_rnd_t rnd_mode);
341 friend inline const mpreal mul_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode);
342 friend inline const mpreal mul_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode);
343 friend inline const mpreal div_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode);
344 friend inline const mpreal div_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode);
345 friend int cmpabs(const mpreal& a,const mpreal& b);
347 friend const mpreal log (const mpreal& v, mp_rnd_t rnd_mode);
348 friend const mpreal log2 (const mpreal& v, mp_rnd_t rnd_mode);
349 friend const mpreal logb (const mpreal& v, mp_rnd_t rnd_mode);
350 friend const mpreal log10(const mpreal& v, mp_rnd_t rnd_mode);
351 friend const mpreal exp (const mpreal& v, mp_rnd_t rnd_mode);
352 friend const mpreal exp2 (const mpreal& v, mp_rnd_t rnd_mode);
353 friend const mpreal exp10(const mpreal& v, mp_rnd_t rnd_mode);
354 friend const mpreal log1p(const mpreal& v, mp_rnd_t rnd_mode);
355 friend const mpreal expm1(const mpreal& v, mp_rnd_t rnd_mode);
357 friend const mpreal cos(const mpreal& v, mp_rnd_t rnd_mode);
358 friend const mpreal sin(const mpreal& v, mp_rnd_t rnd_mode);
359 friend const mpreal tan(const mpreal& v, mp_rnd_t rnd_mode);
360 friend const mpreal sec(const mpreal& v, mp_rnd_t rnd_mode);
361 friend const mpreal csc(const mpreal& v, mp_rnd_t rnd_mode);
362 friend const mpreal cot(const mpreal& v, mp_rnd_t rnd_mode);
363 friend int sin_cos(mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode);
365 friend const mpreal acos (const mpreal& v, mp_rnd_t rnd_mode);
366 friend const mpreal asin (const mpreal& v, mp_rnd_t rnd_mode);
367 friend const mpreal atan (const mpreal& v, mp_rnd_t rnd_mode);
368 friend const mpreal atan2 (const mpreal& y, const mpreal& x, mp_rnd_t rnd_mode);
369 friend const mpreal acot (const mpreal& v, mp_rnd_t rnd_mode);
370 friend const mpreal asec (const mpreal& v, mp_rnd_t rnd_mode);
371 friend const mpreal acsc (const mpreal& v, mp_rnd_t rnd_mode);
373 friend const mpreal cosh (const mpreal& v, mp_rnd_t rnd_mode);
374 friend const mpreal sinh (const mpreal& v, mp_rnd_t rnd_mode);
375 friend const mpreal tanh (const mpreal& v, mp_rnd_t rnd_mode);
376 friend const mpreal sech (const mpreal& v, mp_rnd_t rnd_mode);
377 friend const mpreal csch (const mpreal& v, mp_rnd_t rnd_mode);
378 friend const mpreal coth (const mpreal& v, mp_rnd_t rnd_mode);
379 friend const mpreal acosh (const mpreal& v, mp_rnd_t rnd_mode);
380 friend const mpreal asinh (const mpreal& v, mp_rnd_t rnd_mode);
381 friend const mpreal atanh (const mpreal& v, mp_rnd_t rnd_mode);
382 friend const mpreal acoth (const mpreal& v, mp_rnd_t rnd_mode);
383 friend const mpreal asech (const mpreal& v, mp_rnd_t rnd_mode);
384 friend const mpreal acsch (const mpreal& v, mp_rnd_t rnd_mode);
386 friend const mpreal hypot (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);
388 friend const mpreal fac_ui (unsigned long int v, mp_prec_t prec, mp_rnd_t rnd_mode);
389 friend const mpreal eint (const mpreal& v, mp_rnd_t rnd_mode);
391 friend const mpreal gamma (const mpreal& v, mp_rnd_t rnd_mode);
392 friend const mpreal tgamma (const mpreal& v, mp_rnd_t rnd_mode);
393 friend const mpreal lngamma (const mpreal& v, mp_rnd_t rnd_mode);
394 friend const mpreal lgamma (const mpreal& v, int *signp, mp_rnd_t rnd_mode);
395 friend const mpreal zeta (const mpreal& v, mp_rnd_t rnd_mode);
396 friend const mpreal erf (const mpreal& v, mp_rnd_t rnd_mode);
397 friend const mpreal erfc (const mpreal& v, mp_rnd_t rnd_mode);
398 friend const mpreal besselj0 (const mpreal& v, mp_rnd_t rnd_mode);
399 friend const mpreal besselj1 (const mpreal& v, mp_rnd_t rnd_mode);
400 friend const mpreal besseljn (long n, const mpreal& v, mp_rnd_t rnd_mode);
401 friend const mpreal bessely0 (const mpreal& v, mp_rnd_t rnd_mode);
402 friend const mpreal bessely1 (const mpreal& v, mp_rnd_t rnd_mode);
403 friend const mpreal besselyn (long n, const mpreal& v, mp_rnd_t rnd_mode);
404 …friend const mpreal fma (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_m…
405 …friend const mpreal fms (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_m…
406 friend const mpreal agm (const mpreal& v1, const mpreal& v2, mp_rnd_t rnd_mode);
407 …friend const mpreal sum (const mpreal tab[], const unsigned long int n, int& status, mp_rnd_t…
408 friend int sgn(const mpreal& v); // returns -1 or +1
412 friend int sinh_cosh (mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode);
413 friend const mpreal li2 (const mpreal& v, mp_rnd_t rnd_mode);
414 friend const mpreal fmod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);
415 friend const mpreal rec_sqrt (const mpreal& v, mp_rnd_t rnd_mode);
418 …friend const mpreal rem (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode); // Remainder after …
419 …friend const mpreal mod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode); // Modulus after di…
423 friend const mpreal digamma (const mpreal& v, mp_rnd_t rnd_mode);
424 friend const mpreal ai (const mpreal& v, mp_rnd_t rnd_mode);
425 …friend const mpreal urandom (gmp_randstate_t& state, mp_rnd_t rnd_mode); // use gmp_randinit_d…
429 …friend const mpreal grandom (gmp_randstate_t& state, mp_rnd_t rnd_mode); // use gmp_randinit_d…
430 friend const mpreal grandom (unsigned int seed);
437 friend const mpreal random(unsigned int seed);
441 friend const mpreal modf(const mpreal& v, mpreal& n);
445 friend const mpreal const_log2 (mp_prec_t prec, mp_rnd_t rnd_mode);
446 friend const mpreal const_pi (mp_prec_t prec, mp_rnd_t rnd_mode);
447 friend const mpreal const_euler (mp_prec_t prec, mp_rnd_t rnd_mode);
448 friend const mpreal const_catalan (mp_prec_t prec, mp_rnd_t rnd_mode);
451 friend const mpreal const_infinity(int sign, mp_prec_t prec);
454 friend std::ostream& operator<<(std::ostream& os, const mpreal& v);
455 friend std::istream& operator>>(std::istream& is, mpreal& v);
458 friend const mpreal rint (const mpreal& v, mp_rnd_t rnd_mode);
459 friend const mpreal ceil (const mpreal& v);
460 friend const mpreal floor(const mpreal& v);
461 friend const mpreal round(const mpreal& v);
462 friend const mpreal trunc(const mpreal& v);
463 friend const mpreal rint_ceil (const mpreal& v, mp_rnd_t rnd_mode);
464 friend const mpreal rint_floor (const mpreal& v, mp_rnd_t rnd_mode);
465 friend const mpreal rint_round (const mpreal& v, mp_rnd_t rnd_mode);
466 friend const mpreal rint_trunc (const mpreal& v, mp_rnd_t rnd_mode);
467 friend const mpreal frac (const mpreal& v, mp_rnd_t rnd_mode);
468 friend const mpreal remainder ( const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);
469 friend const mpreal remquo (long* q, const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);
472 friend const mpreal nexttoward (const mpreal& x, const mpreal& y);
473 friend const mpreal nextabove (const mpreal& x);
474 friend const mpreal nextbelow (const mpreal& x);
477 friend const mpreal urandomb (gmp_randstate_t& state);
481 friend const mpreal random2 (mp_size_t size, mp_exp_t exp);
485 friend bool (isnan) (const mpreal& v);
486 friend bool (isinf) (const mpreal& v);
487 friend bool (isfinite) (const mpreal& v);
489 friend bool isnum (const mpreal& v);
490 friend bool iszero (const mpreal& v);
491 friend bool isint (const mpreal& v);
494 friend bool isregular(const mpreal& v);
502 inline mpreal& setPrecision(int Precision, mp_rnd_t RoundingMode = get_default_rnd());
506 mpreal& setInf (int Sign = +1);
507 mpreal& setNan ();
508 mpreal& setZero (int Sign = +1);
509 mpreal& setSign (int Sign, mp_rnd_t RoundingMode = get_default_rnd());
534 friend void swap(mpreal& x, mpreal& y);
536 friend const mpreal fmax(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);
537 friend const mpreal fmin(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);
564 inline mpreal::mpreal() in mpreal() function
566 mpfr_init2(mpfr_ptr(), mpreal::get_default_prec()); in mpreal()
572 inline mpreal::mpreal(const mpreal& u) in mpreal() function
575 mpfr_set (mpfr_ptr(),u.mpfr_srcptr(),mpreal::get_default_rnd()); in mpreal()
581 inline mpreal::mpreal(mpreal&& other) in mpreal() function
589 inline mpreal& mpreal::operator=(mpreal&& other)
598 inline mpreal::mpreal(const mpfr_t u, bool shared) in mpreal() function
607 mpfr_set (mpfr_ptr(), u, mpreal::get_default_rnd()); in mpreal()
613 inline mpreal::mpreal(const mpf_t u) in mpreal() function
616 mpfr_set_f(mpfr_ptr(),u,mpreal::get_default_rnd()); in mpreal()
621 inline mpreal::mpreal(const mpz_t u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
629 inline mpreal::mpreal(const mpq_t u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
637 inline mpreal::mpreal(const double u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
654 inline mpreal::mpreal(const long double u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
662 inline mpreal::mpreal(const unsigned long long int u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
670 inline mpreal::mpreal(const long long int u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
678 inline mpreal::mpreal(const unsigned long int u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
686 inline mpreal::mpreal(const unsigned int u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
694 inline mpreal::mpreal(const long int u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
702 inline mpreal::mpreal(const int u, mp_prec_t prec, mp_rnd_t mode) in mpreal() function
710 inline mpreal::mpreal(const char* s, mp_prec_t prec, int base, mp_rnd_t mode) in mpreal() function
718 inline mpreal::mpreal(const std::string& s, mp_prec_t prec, int base, mp_rnd_t mode) in mpreal() function
726 inline void mpreal::clear(::mpfr_ptr x) in clear()
734 inline mpreal::~mpreal() in ~mpreal()
747 template <> struct result_type<mpreal> {typedef mpreal type;};
748 template <> struct result_type<mpz_t> {typedef mpreal type;};
749 template <> struct result_type<mpq_t> {typedef mpreal type;};
750 template <> struct result_type<long double> {typedef mpreal type;};
751 template <> struct result_type<double> {typedef mpreal type;};
752 template <> struct result_type<unsigned long int> {typedef mpreal type;};
753 template <> struct result_type<unsigned int> {typedef mpreal type;};
754 template <> struct result_type<long int> {typedef mpreal type;};
755 template <> struct result_type<int> {typedef mpreal type;};
756 template <> struct result_type<long long> {typedef mpreal type;};
757 template <> struct result_type<unsigned long long> {typedef mpreal type;};
763 operator+(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) += rhs; }
767 operator+(const Lhs& lhs, const mpreal& rhs){ return mpreal(rhs) += lhs; }
772 operator-(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) -= rhs; }
776 operator-(const Lhs& lhs, const mpreal& rhs){ return mpreal(lhs) -= rhs; }
781 operator*(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) *= rhs; }
785 operator*(const Lhs& lhs, const mpreal& rhs){ return mpreal(rhs) *= lhs; }
790 operator/(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) /= rhs; }
794 operator/(const Lhs& lhs, const mpreal& rhs){ return mpreal(lhs) /= rhs; }
798 const mpreal sqrt(const unsigned int v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
799 const mpreal sqrt(const long int v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
800 const mpreal sqrt(const int v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
801 const mpreal sqrt(const long double v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
802 const mpreal sqrt(const double v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
805 inline const mpreal abs(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd());
809 const mpreal pow(const mpreal& a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd…
810 const mpreal pow(const mpreal& a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
811 const mpreal pow(const mpreal& a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd(…
812 const mpreal pow(const mpreal& a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
814 const mpreal pow(const unsigned int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd…
815 const mpreal pow(const long int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
816 const mpreal pow(const int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
817 const mpreal pow(const long double a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd(…
818 const mpreal pow(const double a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
820 const mpreal pow(const unsigned long int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_d…
821 const mpreal pow(const unsigned long int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_defau…
822 const mpreal pow(const unsigned long int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rn…
823 const mpreal pow(const unsigned long int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_de…
824 const mpreal pow(const unsigned long int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default…
826 const mpreal pow(const unsigned int a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_d…
827 const mpreal pow(const unsigned int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_defaul…
828 const mpreal pow(const unsigned int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rn…
829 const mpreal pow(const unsigned int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
830 const mpreal pow(const unsigned int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default…
831 const mpreal pow(const unsigned int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd(…
833 const mpreal pow(const long int a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_defau…
834 const mpreal pow(const long int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rn…
835 const mpreal pow(const long int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
836 const mpreal pow(const long int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
837 const mpreal pow(const long int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd…
838 const mpreal pow(const long int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
840 const mpreal pow(const int a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rn…
841 const mpreal pow(const int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
842 const mpreal pow(const int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
843 const mpreal pow(const int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
844 const mpreal pow(const int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
845 const mpreal pow(const int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
847 const mpreal pow(const long double a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_…
848 const mpreal pow(const long double a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_de…
849 const mpreal pow(const long double a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default…
850 const mpreal pow(const long double a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd…
851 const mpreal pow(const long double a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
853 const mpreal pow(const double a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
854 const mpreal pow(const double a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default…
855 const mpreal pow(const double a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd(…
856 const mpreal pow(const double a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
857 const mpreal pow(const double a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());
859 inline const mpreal mul_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode = mpreal::get_d…
860 inline const mpreal mul_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode = mpreal::get_default_rn…
861 inline const mpreal div_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode = mpreal::get_d…
862 inline const mpreal div_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode = mpreal::get_default_rn…
867 inline mpreal machine_epsilon(mp_prec_t prec = mpreal::get_default_prec());
870 inline mpreal machine_epsilon(const mpreal& x);
875 inline mpreal minval(mp_prec_t prec = mpreal::get_default_prec());
876 inline mpreal maxval(mp_prec_t prec = mpreal::get_default_prec());
879 inline bool isEqualFuzzy(const mpreal& a, const mpreal& b, const mpreal& eps);
882 inline bool isEqualFuzzy(const mpreal& a, const mpreal& b);
886 inline bool isEqualUlps(const mpreal& a, const mpreal& b, int maxUlps);
898 const mpreal (max)(const mpreal& x, const mpreal& y);
899 const mpreal (min)(const mpreal& x, const mpreal& y);
907 inline mpreal& mpreal::operator=(const mpreal& v)
919 mpfr_set(mpfr_ptr(), v.mpfr_srcptr(), mpreal::get_default_rnd());
926 inline mpreal& mpreal::operator=(const mpf_t v)
928 mpfr_set_f(mpfr_ptr(), v, mpreal::get_default_rnd());
934 inline mpreal& mpreal::operator=(const mpz_t v)
936 mpfr_set_z(mpfr_ptr(), v, mpreal::get_default_rnd());
942 inline mpreal& mpreal::operator=(const mpq_t v)
944 mpfr_set_q(mpfr_ptr(), v, mpreal::get_default_rnd());
950 inline mpreal& mpreal::operator=(const long double v)
952 mpfr_set_ld(mpfr_ptr(), v, mpreal::get_default_rnd());
958 inline mpreal& mpreal::operator=(const double v)
963 mpfr_set_d(mpfr_ptr(),v,mpreal::get_default_rnd());
967 mpfr_set_d(mpfr_ptr(),v,mpreal::get_default_rnd());
974 inline mpreal& mpreal::operator=(const unsigned long int v)
976 mpfr_set_ui(mpfr_ptr(), v, mpreal::get_default_rnd());
982 inline mpreal& mpreal::operator=(const unsigned int v)
984 mpfr_set_ui(mpfr_ptr(), v, mpreal::get_default_rnd());
990 inline mpreal& mpreal::operator=(const unsigned long long int v)
992 mpfr_set_uj(mpfr_ptr(), v, mpreal::get_default_rnd());
998 inline mpreal& mpreal::operator=(const long long int v)
1000 mpfr_set_sj(mpfr_ptr(), v, mpreal::get_default_rnd());
1006 inline mpreal& mpreal::operator=(const long int v)
1008 mpfr_set_si(mpfr_ptr(), v, mpreal::get_default_rnd());
1014 inline mpreal& mpreal::operator=(const int v)
1016 mpfr_set_si(mpfr_ptr(), v, mpreal::get_default_rnd());
1022 inline mpreal& mpreal::operator=(const char* s)
1035 if(0 == mpfr_set_str(t, s, 10, mpreal::get_default_rnd()))
1037 mpfr_set(mpfr_ptr(), t, mpreal::get_default_rnd());
1045 inline mpreal& mpreal::operator=(const std::string& s)
1058 if(0 == mpfr_set_str(t, s.c_str(), 10, mpreal::get_default_rnd()))
1060 mpfr_set(mpfr_ptr(), t, mpreal::get_default_rnd());
1069 inline mpreal& mpreal::operator= (const std::complex<real_t>& z)
1076 inline mpreal& mpreal::operator+=(const mpreal& v)
1078 mpfr_add(mpfr_ptr(), mpfr_srcptr(), v.mpfr_srcptr(), mpreal::get_default_rnd());
1083 inline mpreal& mpreal::operator+=(const mpf_t u)
1085 *this += mpreal(u);
1090 inline mpreal& mpreal::operator+=(const mpz_t u)
1092 mpfr_add_z(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1097 inline mpreal& mpreal::operator+=(const mpq_t u)
1099 mpfr_add_q(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1104 inline mpreal& mpreal::operator+= (const long double u)
1106 *this += mpreal(u);
1111 inline mpreal& mpreal::operator+= (const double u)
1114 mpfr_add_d(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1116 *this += mpreal(u);
1123 inline mpreal& mpreal::operator+=(const unsigned long int u)
1125 mpfr_add_ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1130 inline mpreal& mpreal::operator+=(const unsigned int u)
1132 mpfr_add_ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1137 inline mpreal& mpreal::operator+=(const long int u)
1139 mpfr_add_si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1144 inline mpreal& mpreal::operator+=(const int u)
1146 mpfr_add_si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1151 inline mpreal& mpreal::operator+=(const long long int u) { *this += mpreal(u); MPREAL_MS…
1152 inline mpreal& mpreal::operator+=(const unsigned long long int u){ *this += mpreal(u); MPREAL_MS…
1153 inline mpreal& mpreal::operator-=(const long long int u) { *this -= mpreal(u); MPREAL_MS…
1154 inline mpreal& mpreal::operator-=(const unsigned long long int u){ *this -= mpreal(u); MPREAL_MS…
1155 inline mpreal& mpreal::operator*=(const long long int u) { *this *= mpreal(u); MPREAL_MS…
1156 inline mpreal& mpreal::operator*=(const unsigned long long int u){ *this *= mpreal(u); MPREAL_MS…
1157 inline mpreal& mpreal::operator/=(const long long int u) { *this /= mpreal(u); MPREAL_MS…
1158 inline mpreal& mpreal::operator/=(const unsigned long long int u){ *this /= mpreal(u); MPREAL_MS…
1160 inline const mpreal mpreal::operator+()const { return mpreal(*this); }
1162 inline const mpreal operator+(const mpreal& a, const mpreal& b)
1164 mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
1165 mpfr_add(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
1169 inline mpreal& mpreal::operator++()
1174 inline const mpreal mpreal::operator++ (int)
1176 mpreal x(*this);
1181 inline mpreal& mpreal::operator--()
1186 inline const mpreal mpreal::operator-- (int)
1188 mpreal x(*this);
1195 inline mpreal& mpreal::operator-=(const mpreal& v)
1197 mpfr_sub(mpfr_ptr(),mpfr_srcptr(),v.mpfr_srcptr(),mpreal::get_default_rnd());
1202 inline mpreal& mpreal::operator-=(const mpz_t v)
1204 mpfr_sub_z(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1209 inline mpreal& mpreal::operator-=(const mpq_t v)
1211 mpfr_sub_q(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1216 inline mpreal& mpreal::operator-=(const long double v)
1218 *this -= mpreal(v);
1223 inline mpreal& mpreal::operator-=(const double v)
1226 mpfr_sub_d(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1228 *this -= mpreal(v);
1235 inline mpreal& mpreal::operator-=(const unsigned long int v)
1237 mpfr_sub_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1242 inline mpreal& mpreal::operator-=(const unsigned int v)
1244 mpfr_sub_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1249 inline mpreal& mpreal::operator-=(const long int v)
1251 mpfr_sub_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1256 inline mpreal& mpreal::operator-=(const int v)
1258 mpfr_sub_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1263 inline const mpreal mpreal::operator-()const
1265 mpreal u(*this);
1266 mpfr_neg(u.mpfr_ptr(),u.mpfr_srcptr(),mpreal::get_default_rnd());
1270 inline const mpreal operator-(const mpreal& a, const mpreal& b)
1272 mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
1273 mpfr_sub(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
1277 inline const mpreal operator-(const double b, const mpreal& a)
1280 mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));
1281 mpfr_d_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1284 mpreal x(b, mpfr_get_prec(a.mpfr_ptr()));
1290 inline const mpreal operator-(const unsigned long int b, const mpreal& a)
1292 mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));
1293 mpfr_ui_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1297 inline const mpreal operator-(const unsigned int b, const mpreal& a)
1299 mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));
1300 mpfr_ui_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1304 inline const mpreal operator-(const long int b, const mpreal& a)
1306 mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));
1307 mpfr_si_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1311 inline const mpreal operator-(const int b, const mpreal& a)
1313 mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));
1314 mpfr_si_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1320 inline mpreal& mpreal::operator*= (const mpreal& v)
1322 mpfr_mul(mpfr_ptr(),mpfr_srcptr(),v.mpfr_srcptr(),mpreal::get_default_rnd());
1327 inline mpreal& mpreal::operator*=(const mpz_t v)
1329 mpfr_mul_z(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1334 inline mpreal& mpreal::operator*=(const mpq_t v)
1336 mpfr_mul_q(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1341 inline mpreal& mpreal::operator*=(const long double v)
1343 *this *= mpreal(v);
1348 inline mpreal& mpreal::operator*=(const double v)
1351 mpfr_mul_d(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1353 *this *= mpreal(v);
1359 inline mpreal& mpreal::operator*=(const unsigned long int v)
1361 mpfr_mul_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1366 inline mpreal& mpreal::operator*=(const unsigned int v)
1368 mpfr_mul_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1373 inline mpreal& mpreal::operator*=(const long int v)
1375 mpfr_mul_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1380 inline mpreal& mpreal::operator*=(const int v)
1382 mpfr_mul_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1387 inline const mpreal operator*(const mpreal& a, const mpreal& b)
1389 mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
1390 mpfr_mul(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
1396 inline mpreal& mpreal::operator/=(const mpreal& v)
1398 mpfr_div(mpfr_ptr(),mpfr_srcptr(),v.mpfr_srcptr(),mpreal::get_default_rnd());
1403 inline mpreal& mpreal::operator/=(const mpz_t v)
1405 mpfr_div_z(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1410 inline mpreal& mpreal::operator/=(const mpq_t v)
1412 mpfr_div_q(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1417 inline mpreal& mpreal::operator/=(const long double v)
1419 *this /= mpreal(v);
1424 inline mpreal& mpreal::operator/=(const double v)
1427 mpfr_div_d(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1429 *this /= mpreal(v);
1435 inline mpreal& mpreal::operator/=(const unsigned long int v)
1437 mpfr_div_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1442 inline mpreal& mpreal::operator/=(const unsigned int v)
1444 mpfr_div_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1449 inline mpreal& mpreal::operator/=(const long int v)
1451 mpfr_div_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1456 inline mpreal& mpreal::operator/=(const int v)
1458 mpfr_div_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());
1463 inline const mpreal operator/(const mpreal& a, const mpreal& b)
1465 mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_srcptr()), mpfr_get_prec(b.mpfr_srcptr())));
1466 mpfr_div(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
1470 inline const mpreal operator/(const unsigned long int b, const mpreal& a)
1472 mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));
1473 mpfr_ui_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1477 inline const mpreal operator/(const unsigned int b, const mpreal& a)
1479 mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));
1480 mpfr_ui_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1484 inline const mpreal operator/(const long int b, const mpreal& a)
1486 mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));
1487 mpfr_si_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1491 inline const mpreal operator/(const int b, const mpreal& a)
1493 mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));
1494 mpfr_si_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1498 inline const mpreal operator/(const double b, const mpreal& a)
1501 mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));
1502 mpfr_d_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());
1505 mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));
1513 inline mpreal& mpreal::operator<<=(const unsigned long int u)
1515 mpfr_mul_2ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1520 inline mpreal& mpreal::operator<<=(const unsigned int u)
1522 …mpfr_mul_2ui(mpfr_ptr(),mpfr_srcptr(),static_cast<unsigned long int>(u),mpreal::get_default_rnd());
1527 inline mpreal& mpreal::operator<<=(const long int u)
1529 mpfr_mul_2si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1534 inline mpreal& mpreal::operator<<=(const int u)
1536 mpfr_mul_2si(mpfr_ptr(),mpfr_srcptr(),static_cast<long int>(u),mpreal::get_default_rnd());
1541 inline mpreal& mpreal::operator>>=(const unsigned long int u)
1543 mpfr_div_2ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1548 inline mpreal& mpreal::operator>>=(const unsigned int u)
1550 …mpfr_div_2ui(mpfr_ptr(),mpfr_srcptr(),static_cast<unsigned long int>(u),mpreal::get_default_rnd());
1555 inline mpreal& mpreal::operator>>=(const long int u)
1557 mpfr_div_2si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());
1562 inline mpreal& mpreal::operator>>=(const int u)
1564 mpfr_div_2si(mpfr_ptr(),mpfr_srcptr(),static_cast<long int>(u),mpreal::get_default_rnd());
1569 inline const mpreal operator<<(const mpreal& v, const unsigned long int k)
1574 inline const mpreal operator<<(const mpreal& v, const unsigned int k)
1579 inline const mpreal operator<<(const mpreal& v, const long int k)
1584 inline const mpreal operator<<(const mpreal& v, const int k)
1589 inline const mpreal operator>>(const mpreal& v, const unsigned long int k)
1594 inline const mpreal operator>>(const mpreal& v, const long int k)
1599 inline const mpreal operator>>(const mpreal& v, const unsigned int k)
1604 inline const mpreal operator>>(const mpreal& v, const int k)
1610 inline const mpreal mul_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode)
1612 mpreal x(v);
1618 inline const mpreal mul_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode)
1620 mpreal x(v);
1625 inline const mpreal div_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode)
1627 mpreal x(v);
1632 inline const mpreal div_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode)
1634 mpreal x(v);
1652 inline bool operator > (const mpreal& a, const mpreal& b ){ return (mpfr_greater_p(a.mp…
1653 inline bool operator > (const mpreal& a, const unsigned long int b ){ return !isnan EIGEN_NOT_A_M…
1654 inline bool operator > (const mpreal& a, const unsigned int b ){ return !isnan EIGEN_NOT_A_M…
1655 inline bool operator > (const mpreal& a, const long int b ){ return !isnan EIGEN_NOT_A_M…
1656 inline bool operator > (const mpreal& a, const int b ){ return !isnan EIGEN_NOT_A_M…
1657 inline bool operator > (const mpreal& a, const long double b ){ return !isnan EIGEN_NOT_A_M…
1658 inline bool operator > (const mpreal& a, const double b ){ return !isnan EIGEN_NOT_A_M…
1660 inline bool operator >= (const mpreal& a, const mpreal& b ){ return (mpfr_greaterequal_p…
1661 inline bool operator >= (const mpreal& a, const unsigned long int b ){ return !isnan EIGEN_NOT_A_M…
1663 inline bool operator >= (const mpreal& a, const long int b ){ return !isnan EIGEN_NOT_A_M…
1664 inline bool operator >= (const mpreal& a, const int b ){ return !isnan EIGEN_NOT_A_M…
1665 inline bool operator >= (const mpreal& a, const long double b ){ return !isnan EIGEN_NOT_A_M…
1666 inline bool operator >= (const mpreal& a, const double b ){ return !isnan EIGEN_NOT_A_M…
1668 inline bool operator < (const mpreal& a, const mpreal& b ){ return (mpfr_less_p(a.mpfr_…
1669 inline bool operator < (const mpreal& a, const unsigned long int b ){ return !isnan EIGEN_NOT_A_M…
1670 inline bool operator < (const mpreal& a, const unsigned int b ){ return !isnan EIGEN_NOT_A_M…
1671 inline bool operator < (const mpreal& a, const long int b ){ return !isnan EIGEN_NOT_A_M…
1672 inline bool operator < (const mpreal& a, const int b ){ return !isnan EIGEN_NOT_A_M…
1673 inline bool operator < (const mpreal& a, const long double b ){ return !isnan EIGEN_NOT_A_M…
1674 inline bool operator < (const mpreal& a, const double b ){ return !isnan EIGEN_NOT_A_M…
1676 inline bool operator <= (const mpreal& a, const mpreal& b ){ return (mpfr_lessequal_p(a.…
1677 inline bool operator <= (const mpreal& a, const unsigned long int b ){ return !isnan EIGEN_NOT_A_M…
1678 inline bool operator <= (const mpreal& a, const unsigned int b ){ return !isnan EIGEN_NOT_A_M…
1679 inline bool operator <= (const mpreal& a, const long int b ){ return !isnan EIGEN_NOT_A_M…
1680 inline bool operator <= (const mpreal& a, const int b ){ return !isnan EIGEN_NOT_A_M…
1681 inline bool operator <= (const mpreal& a, const long double b ){ return !isnan EIGEN_NOT_A_M…
1682 inline bool operator <= (const mpreal& a, const double b ){ return !isnan EIGEN_NOT_A_M…
1684 inline bool operator == (const mpreal& a, const mpreal& b ){ return (mpfr_equal_p(a.mpfr…
1685 inline bool operator == (const mpreal& a, const unsigned long int b ){ return !isnan EIGEN_NOT_A_M…
1686 inline bool operator == (const mpreal& a, const unsigned int b ){ return !isnan EIGEN_NOT_A_M…
1687 inline bool operator == (const mpreal& a, const long int b ){ return !isnan EIGEN_NOT_A_M…
1688 inline bool operator == (const mpreal& a, const int b ){ return !isnan EIGEN_NOT_A_M…
1689 inline bool operator == (const mpreal& a, const long double b ){ return !isnan EIGEN_NOT_A_M…
1690 inline bool operator == (const mpreal& a, const double b ){ return !isnan EIGEN_NOT_A_M…
1692 inline bool operator != (const mpreal& a, const mpreal& b ){ return !(a == b); }
1693 inline bool operator != (const mpreal& a, const unsigned long int b ){ return !(a == b); }
1694 inline bool operator != (const mpreal& a, const unsigned int b ){ return !(a == b); }
1695 inline bool operator != (const mpreal& a, const long int b ){ return !(a == b); }
1696 inline bool operator != (const mpreal& a, const int b ){ return !(a == b); }
1697 inline bool operator != (const mpreal& a, const long double b ){ return !(a == b); }
1698 inline bool operator != (const mpreal& a, const double b ){ return !(a == b); }
1700 inline bool (isnan) (const mpreal& op){ return (mpfr_nan_p (op.mpfr_srcptr()) != 0 ); }
1701 inline bool (isinf) (const mpreal& op){ return (mpfr_inf_p (op.mpfr_srcptr()) != 0 ); }
1702 inline bool (isfinite) (const mpreal& op){ return (mpfr_number_p (op.mpfr_srcptr()) != 0 ); }
1703 inline bool iszero (const mpreal& op){ return (mpfr_zero_p (op.mpfr_srcptr()) != 0 ); }
1704 inline bool isint (const mpreal& op){ return (mpfr_integer_p(op.mpfr_srcptr()) != 0 ); }
1707 inline bool isregular(const mpreal& op){ return (mpfr_regular_p(op.mpfr_srcptr()));}
1712 inline bool mpreal::toBool ( ) const { return mpfr_zero_p (mpfr…
1713 inline long mpreal::toLong (mp_rnd_t mode) const { return mpfr_get_si (mpfr…
1714 inline unsigned long mpreal::toULong (mp_rnd_t mode) const { return mpfr_get_ui (mpfr…
1715 inline float mpreal::toFloat (mp_rnd_t mode) const { return mpfr_get_flt(mpfr…
1716 inline double mpreal::toDouble (mp_rnd_t mode) const { return mpfr_get_d (mpfr…
1717 inline long double mpreal::toLDouble(mp_rnd_t mode) const { return mpfr_get_ld (mpfr…
1718 inline long long mpreal::toLLong (mp_rnd_t mode) const { return mpfr_get_sj (mpfr…
1719 inline unsigned long long mpreal::toULLong (mp_rnd_t mode) const { return mpfr_get_uj (mpfr…
1721 inline ::mpfr_ptr mpreal::mpfr_ptr() { return mp; }
1722 inline ::mpfr_srcptr mpreal::mpfr_ptr() const { return mp; }
1723 inline ::mpfr_srcptr mpreal::mpfr_srcptr() const { return mp; }
1735 inline std::string mpreal::toString(const std::string& format) const
1755 inline std::string mpreal::toString(int n, int b, mp_rnd_t mode) const
1873 inline std::ostream& mpreal::output(std::ostream& os) const
1889 mpfr::mpreal::get_default_rnd(),
1899 inline std::ostream& operator<<(std::ostream& os, const mpreal& v)
1904 inline std::istream& operator>>(std::istream &is, mpreal& v)
1909 mpfr_set_str(v.mpfr_ptr(), tmp.c_str(), 10, mpreal::get_default_rnd());
1934 inline int sgn(const mpreal& op)
1939 inline mpreal& mpreal::setSign(int sign, mp_rnd_t RoundingMode)
1946 inline int mpreal::getPrecision() const
1951 inline mpreal& mpreal::setPrecision(int Precision, mp_rnd_t RoundingMode)
1958 inline mpreal& mpreal::setInf(int sign)
1965 inline mpreal& mpreal::setNan()
1972 inline mpreal& mpreal::setZero(int sign)
1985 inline mp_prec_t mpreal::get_prec() const
1990 inline void mpreal::set_prec(mp_prec_t prec, mp_rnd_t rnd_mode)
1996 inline mp_exp_t mpreal::get_exp ()
2001 inline int mpreal::set_exp (mp_exp_t e)
2008 inline const mpreal frexp(const mpreal& x, mp_exp_t* exp, mp_rnd_t mode = mpreal::get_default_rnd())
2010 mpreal y(x);
2020 inline const mpreal ldexp(const mpreal& v, mp_exp_t exp)
2022 mpreal x(v);
2025 mpfr_mul_2si(x.mpfr_ptr(), x.mpfr_srcptr(), exp, mpreal::get_default_rnd());
2029 inline const mpreal scalbn(const mpreal& v, mp_exp_t exp)
2034 inline mpreal machine_epsilon(mp_prec_t prec)
2037 return machine_epsilon(mpreal(1, prec));
2040 inline mpreal machine_epsilon(const mpreal& x)
2052 inline mpreal minval(mp_prec_t prec)
2055 return mpreal(1, prec) << mpreal::get_emin()-1;
2059 inline mpreal maxval(mp_prec_t prec)
2062 return (mpreal(1, prec) - machine_epsilon(prec)) << mpreal::get_emax();
2065 inline bool isEqualUlps(const mpreal& a, const mpreal& b, int maxUlps)
2070 inline bool isEqualFuzzy(const mpreal& a, const mpreal& b, const mpreal& eps)
2075 inline bool isEqualFuzzy(const mpreal& a, const mpreal& b)
2082 inline mpreal copysign(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_r…
2084 mpreal rop(0, mpfr_get_prec(x.mpfr_ptr()));
2089 inline bool signbit(const mpreal& x)
2094 inline const mpreal modf(const mpreal& v, mpreal& n)
2096 mpreal f(v);
2099 mpfr_frac (f.mpfr_ptr(),f.mpfr_srcptr(),mpreal::get_default_rnd());
2104 inline int mpreal::check_range (int t, mp_rnd_t rnd_mode)
2109 inline int mpreal::subnormalize (int t,mp_rnd_t rnd_mode)
2116 inline mp_exp_t mpreal::get_emin (void)
2121 inline int mpreal::set_emin (mp_exp_t exp)
2126 inline mp_exp_t mpreal::get_emax (void)
2131 inline int mpreal::set_emax (mp_exp_t exp)
2136 inline mp_exp_t mpreal::get_emin_min (void)
2141 inline mp_exp_t mpreal::get_emin_max (void)
2146 inline mp_exp_t mpreal::get_emax_min (void)
2151 inline mp_exp_t mpreal::get_emax_max (void)
2160 mpreal y(0, mpfr_get_prec(x.mpfr_srcptr())); \
2164 inline const mpreal sqr (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())
2167 inline const mpreal sqrt (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())
2170 inline const mpreal sqrt(const unsigned long int x, mp_rnd_t r)
2172 mpreal y;
2177 inline const mpreal sqrt(const unsigned int v, mp_rnd_t rnd_mode)
2182 inline const mpreal sqrt(const long int v, mp_rnd_t rnd_mode)
2185 else return mpreal().setNan(); // NaN
2188 inline const mpreal sqrt(const int v, mp_rnd_t rnd_mode)
2191 else return mpreal().setNan(); // NaN
2194 inline const mpreal root(const mpreal& x, unsigned long int k, mp_rnd_t r = mpreal::get_default_rnd…
2196 mpreal y(0, mpfr_get_prec(x.mpfr_srcptr()));
2201 inline const mpreal dim(const mpreal& a, const mpreal& b, mp_rnd_t r = mpreal::get_default_rnd())
2203 mpreal y(0, mpfr_get_prec(a.mpfr_srcptr()));
2208 inline int cmpabs(const mpreal& a,const mpreal& b)
2213 inline int sin_cos(mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode = mpreal::get_default_r…
2218 inline const mpreal sqrt (const long double v, mp_rnd_t rnd_mode) { return sqrt(mpreal(v),rnd…
2219 inline const mpreal sqrt (const double v, mp_rnd_t rnd_mode) { return sqrt(mpreal(v),rnd…
2221 inline const mpreal cbrt (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2222 inline const mpreal fabs (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2223 inline const mpreal abs (const mpreal& x, mp_rnd_t r) { MPREAL_UNAR…
2224 inline const mpreal log (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2225 inline const mpreal log2 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2226 inline const mpreal log10 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2227 inline const mpreal exp (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2228 inline const mpreal exp2 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2229 inline const mpreal exp10 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2230 inline const mpreal cos (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2231 inline const mpreal sin (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2232 inline const mpreal tan (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2233 inline const mpreal sec (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2234 inline const mpreal csc (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2235 inline const mpreal cot (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2236 inline const mpreal acos (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2237 inline const mpreal asin (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2238 inline const mpreal atan (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2240 inline const mpreal logb (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { return log2…
2242 inline const mpreal acot (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) { return atan…
2243 inline const mpreal asec (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) { return acos…
2244 inline const mpreal acsc (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) { return asin…
2245 inline const mpreal acoth (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) { return atan…
2246 inline const mpreal asech (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) { return acos…
2247 inline const mpreal acsch (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) { return asin…
2249 inline const mpreal cosh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2250 inline const mpreal sinh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2251 inline const mpreal tanh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2252 inline const mpreal sech (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2253 inline const mpreal csch (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2254 inline const mpreal coth (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2255 inline const mpreal acosh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2256 inline const mpreal asinh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2257 inline const mpreal atanh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UNAR…
2259 inline const mpreal log1p (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2260 inline const mpreal expm1 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2261 inline const mpreal eint (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2262 inline const mpreal gamma (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2263 inline const mpreal tgamma (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2264 inline const mpreal lngamma (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2265 inline const mpreal zeta (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2266 inline const mpreal erf (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2267 inline const mpreal erfc (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2268 inline const mpreal besselj0(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2269 inline const mpreal besselj1(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2270 inline const mpreal bessely0(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2271 inline const mpreal bessely1(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2273 inline const mpreal atan2 (const mpreal& y, const mpreal& x, mp_rnd_t rnd_mode = mpreal::get_defaul…
2275 mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));
2280 inline const mpreal hypot (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_defaul…
2282 mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));
2287 inline const mpreal remainder (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_de…
2289 mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));
2294 inline const mpreal remquo (long* q, const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::…
2296 mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));
2301 inline const mpreal fac_ui (unsigned long int v, mp_prec_t prec = mpreal::get_default_prec(),
2302 mp_rnd_t rnd_mode = mpreal::get_default_rnd())
2304 mpreal x(0, prec);
2310 inline const mpreal lgamma (const mpreal& v, int *signp = 0, mp_rnd_t rnd_mode = mpreal::get_defaul…
2312 mpreal x(v);
2322 inline const mpreal besseljn (long n, const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())
2324 mpreal y(0, x.getPrecision());
2329 inline const mpreal besselyn (long n, const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())
2331 mpreal y(0, x.getPrecision());
2336 inline const mpreal fma (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_mode =
2338 mpreal a;
2351 inline const mpreal fms (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_mode =
2353 mpreal a;
2366 inline const mpreal agm (const mpreal& v1, const mpreal& v2, mp_rnd_t rnd_mode = mpreal::get_defaul…
2368 mpreal a;
2381 inline const mpreal sum (const mpreal tab[], const unsigned long int n, int& status, mp_rnd_t mode …
2388 mpreal x;
2399 inline int sinh_cosh(mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode = mpreal::get_default…
2404 inline const mpreal li2 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())
2409 inline const mpreal rem (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_…
2415 inline const mpreal mod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_…
2433 mpreal m = x - floor(x / y) * y;
2440 inline const mpreal fmod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default…
2442 mpreal a;
2455 inline const mpreal rec_sqrt(const mpreal& v, mp_rnd_t rnd_mode = mpreal::get_default_rnd())
2457 mpreal x(v);
2466 inline const mpreal digamma (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2467 inline const mpreal ai (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL_UN…
2472 inline const mpreal const_log2 (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get_…
2474 mpreal x(0, p);
2479 inline const mpreal const_pi (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get_de…
2481 mpreal x(0, p);
2486 inline const mpreal const_euler (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get…
2488 mpreal x(0, p);
2493 inline const mpreal const_catalan (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::g…
2495 mpreal x(0, p);
2500 inline const mpreal const_infinity (int sign = 1, mp_prec_t p = mpreal::get_default_prec())
2502 mpreal x(0, p);
2509 inline const mpreal ceil(const mpreal& v)
2511 mpreal x(v);
2516 inline const mpreal floor(const mpreal& v)
2518 mpreal x(v);
2523 inline const mpreal round(const mpreal& v)
2525 mpreal x(v);
2530 inline const mpreal trunc(const mpreal& v)
2532 mpreal x(v);
2537 inline const mpreal rint (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL…
2538 inline const mpreal rint_ceil (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL…
2539 inline const mpreal rint_floor (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL…
2540 inline const mpreal rint_round (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL…
2541 inline const mpreal rint_trunc (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL…
2542 inline const mpreal frac (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) { MPREAL…
2546 inline void swap (mpreal& a, mpreal& b) { mpfr_swap(a.mp,b.mp); }
2547 inline const mpreal (max)(const mpreal& x, const mpreal& y){ return (x>y?x:y); }
2548 inline const mpreal (min)(const mpreal& x, const mpreal& y){ return (x<y?x:y); }
2550 inline const mpreal fmax(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_…
2552 mpreal a;
2557 inline const mpreal fmin(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default…
2559 mpreal a;
2564 inline const mpreal nexttoward (const mpreal& x, const mpreal& y)
2566 mpreal a(x);
2571 inline const mpreal nextabove (const mpreal& x)
2573 mpreal a(x);
2578 inline const mpreal nextbelow (const mpreal& x)
2580 mpreal a(x);
2585 inline const mpreal urandomb (gmp_randstate_t& state)
2587 mpreal x;
2593 inline const mpreal urandom (gmp_randstate_t& state, mp_rnd_t rnd_mode = mpreal::get_default_rnd())
2595 mpreal x;
2602 inline const mpreal random2 (mp_size_t size, mp_exp_t exp)
2604 mpreal x;
2614 inline const mpreal random(unsigned int seed = 0)
2632 return mpfr::mpreal(std::rand()/(double)RAND_MAX);
2639 inline const mpreal grandom (gmp_randstate_t& state, mp_rnd_t rnd_mode = mpreal::get_default_rnd())
2641 mpreal x;
2646 inline const mpreal grandom(unsigned int seed = 0)
2666 inline void mpreal::set_default_prec(mp_prec_t prec)
2671 inline void mpreal::set_default_rnd(mp_rnd_t rnd_mode)
2676 inline bool mpreal::fits_in_bits(double x, int n)
2683 inline const mpreal pow(const mpreal& a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_r…
2685 mpreal x(a);
2690 inline const mpreal pow(const mpreal& a, const mpz_t b, mp_rnd_t rnd_mode = mpreal::get_default_rnd…
2692 mpreal x(a);
2697 inline const mpreal pow(const mpreal& a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get…
2699 mpreal x(a);
2704 inline const mpreal pow(const mpreal& a, const unsigned int b, mp_rnd_t rnd_mode)
2709 inline const mpreal pow(const mpreal& a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_…
2711 mpreal x(a);
2716 inline const mpreal pow(const mpreal& a, const int b, mp_rnd_t rnd_mode)
2721 inline const mpreal pow(const mpreal& a, const long double b, mp_rnd_t rnd_mode)
2723 return pow(a,mpreal(b),rnd_mode);
2726 inline const mpreal pow(const mpreal& a, const double b, mp_rnd_t rnd_mode)
2728 return pow(a,mpreal(b),rnd_mode);
2731 inline const mpreal pow(const unsigned long int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get…
2733 mpreal x(a);
2738 inline const mpreal pow(const unsigned int a, const mpreal& b, mp_rnd_t rnd_mode)
2743 inline const mpreal pow(const long int a, const mpreal& b, mp_rnd_t rnd_mode)
2746 else return pow(mpreal(a),b,rnd_mode);
2749 inline const mpreal pow(const int a, const mpreal& b, mp_rnd_t rnd_mode)
2752 else return pow(mpreal(a),b,rnd_mode);
2755 inline const mpreal pow(const long double a, const mpreal& b, mp_rnd_t rnd_mode)
2757 return pow(mpreal(a),b,rnd_mode);
2760 inline const mpreal pow(const double a, const mpreal& b, mp_rnd_t rnd_mode)
2762 return pow(mpreal(a),b,rnd_mode);
2766 inline const mpreal pow(const unsigned long int a, const unsigned long int b, mp_rnd_t rnd_mode)
2768 mpreal x(a);
2773 inline const mpreal pow(const unsigned long int a, const unsigned int b, mp_rnd_t rnd_mode)
2778 inline const mpreal pow(const unsigned long int a, const long int b, mp_rnd_t rnd_mode)
2781 else return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow
2784 inline const mpreal pow(const unsigned long int a, const int b, mp_rnd_t rnd_mode)
2787 else return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow
2790 inline const mpreal pow(const unsigned long int a, const long double b, mp_rnd_t rnd_mode)
2792 return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow
2795 inline const mpreal pow(const unsigned long int a, const double b, mp_rnd_t rnd_mode)
2797 return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow
2801 inline const mpreal pow(const unsigned int a, const unsigned long int b, mp_rnd_t rnd_mode)
2806 inline const mpreal pow(const unsigned int a, const unsigned int b, mp_rnd_t rnd_mode)
2811 inline const mpreal pow(const unsigned int a, const long int b, mp_rnd_t rnd_mode)
2814 else return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2817 inline const mpreal pow(const unsigned int a, const int b, mp_rnd_t rnd_mode)
2820 else return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2823 inline const mpreal pow(const unsigned int a, const long double b, mp_rnd_t rnd_mode)
2825 return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2828 inline const mpreal pow(const unsigned int a, const double b, mp_rnd_t rnd_mode)
2830 return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2834 inline const mpreal pow(const long int a, const unsigned long int b, mp_rnd_t rnd_mode)
2837 else return pow(mpreal(a),b,rnd_mode); //mpfr_pow_ui
2840 inline const mpreal pow(const long int a, const unsigned int b, mp_rnd_t rnd_mode)
2843 else return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_pow_ui
2846 inline const mpreal pow(const long int a, const long int b, mp_rnd_t rnd_mode)
2851 else return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2853 return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si
2857 inline const mpreal pow(const long int a, const int b, mp_rnd_t rnd_mode)
2862 else return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2864 return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si
2868 inline const mpreal pow(const long int a, const long double b, mp_rnd_t rnd_mode)
2870 if (a>=0) return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2871 else return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow
2874 inline const mpreal pow(const long int a, const double b, mp_rnd_t rnd_mode)
2876 if (a>=0) return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2877 else return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow
2881 inline const mpreal pow(const int a, const unsigned long int b, mp_rnd_t rnd_mode)
2884 else return pow(mpreal(a),b,rnd_mode); //mpfr_pow_ui
2887 inline const mpreal pow(const int a, const unsigned int b, mp_rnd_t rnd_mode)
2890 else return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_pow_ui
2893 inline const mpreal pow(const int a, const long int b, mp_rnd_t rnd_mode)
2898 else return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2900 return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si
2904 inline const mpreal pow(const int a, const int b, mp_rnd_t rnd_mode)
2909 else return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2911 return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si
2915 inline const mpreal pow(const int a, const long double b, mp_rnd_t rnd_mode)
2917 if (a>=0) return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2918 else return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow
2921 inline const mpreal pow(const int a, const double b, mp_rnd_t rnd_mode)
2923 if (a>=0) return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow
2924 else return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow
2928 inline const mpreal pow(const long double a, const long double b, mp_rnd_t rnd_mode)
2930 return pow(mpreal(a),mpreal(b),rnd_mode);
2933 inline const mpreal pow(const long double a, const unsigned long int b, mp_rnd_t rnd_mode)
2935 return pow(mpreal(a),b,rnd_mode); //mpfr_pow_ui
2938 inline const mpreal pow(const long double a, const unsigned int b, mp_rnd_t rnd_mode)
2940 return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_pow_ui
2943 inline const mpreal pow(const long double a, const long int b, mp_rnd_t rnd_mode)
2945 return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si
2948 inline const mpreal pow(const long double a, const int b, mp_rnd_t rnd_mode)
2950 return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si
2953 inline const mpreal pow(const double a, const double b, mp_rnd_t rnd_mode)
2955 return pow(mpreal(a),mpreal(b),rnd_mode);
2958 inline const mpreal pow(const double a, const unsigned long int b, mp_rnd_t rnd_mode)
2960 return pow(mpreal(a),b,rnd_mode); // mpfr_pow_ui
2963 inline const mpreal pow(const double a, const unsigned int b, mp_rnd_t rnd_mode)
2965 return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); // mpfr_pow_ui
2968 inline const mpreal pow(const double a, const long int b, mp_rnd_t rnd_mode)
2970 return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si
2973 inline const mpreal pow(const double a, const int b, mp_rnd_t rnd_mode)
2975 return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si
2986 inline void swap(mpfr::mpreal& x, mpfr::mpreal& y)
2992 class numeric_limits<mpfr::mpreal>
3013 …inline static mpfr::mpreal (min) (mp_prec_t precision = mpfr::mpreal::get_default_prec()) { re…
3014 …inline static mpfr::mpreal (max) (mp_prec_t precision = mpfr::mpreal::get_default_prec()) { re…
3015 …inline static mpfr::mpreal lowest (mp_prec_t precision = mpfr::mpreal::get_default_prec()) { re…
3018 …inline static mpfr::mpreal epsilon(mp_prec_t precision = mpfr::mpreal::get_default_prec()) { retu…
3021 … inline static mpfr::mpreal epsilon(const mpfr::mpreal& x) { return mpfr::machine_epsilon(x); }
3023 … inline static mpfr::mpreal round_error(mp_prec_t precision = mpfr::mpreal::get_default_prec())
3025 mp_rnd_t r = mpfr::mpreal::get_default_rnd();
3027 if(r == GMP_RNDN) return mpfr::mpreal(0.5, precision);
3028 else return mpfr::mpreal(1.0, precision);
3031 inline static const mpfr::mpreal infinity() { return mpfr::const_infinity(); }
3032 inline static const mpfr::mpreal quiet_NaN() { return mpfr::mpreal().setNan(); }
3033 inline static const mpfr::mpreal signaling_NaN() { return mpfr::mpreal().setNan(); }
3034 inline static const mpfr::mpreal denorm_min() { return (min)(); }
3052 mp_rnd_t r = mpfr::mpreal::get_default_rnd();
3064 …inline static int digits() { return int(mpfr::mpreal::get_default_prec()…
3065 …inline static int digits(const mpfr::mpreal& x) { return x.getPrecision(); …
3067 inline static int digits10(mp_prec_t precision = mpfr::mpreal::get_default_prec())
3072 inline static int digits10(const mpfr::mpreal& x)
3077 inline static int max_digits10(mp_prec_t precision = mpfr::mpreal::get_default_prec())