diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-10-29 17:43:21 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-10-29 17:43:21 +0100 |
commit | 5974685866b5deb1a84680e9e9689d4e8b7d034e (patch) | |
tree | 5976cc83d7b7d5d74da1845287f5effd91bf4dfb /unsupported/test/mpreal | |
parent | 7fae9b358d68b43330e2b9889c413e262a9a04cf (diff) |
Fix parenthesis min/max issue in mpreal
Diffstat (limited to 'unsupported/test/mpreal')
-rw-r--r-- | unsupported/test/mpreal/mpreal.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unsupported/test/mpreal/mpreal.h b/unsupported/test/mpreal/mpreal.h index 75bda7db7..70d37ab71 100644 --- a/unsupported/test/mpreal/mpreal.h +++ b/unsupported/test/mpreal/mpreal.h @@ -1262,9 +1262,9 @@ inline const mpreal mpreal::operator-()const inline const mpreal operator-(const mpreal& a, const mpreal& b)
{
- mpreal c(0, std::max(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
- mpfr_sub(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
- return c;
+ mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
+ mpfr_sub(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
+ return c;
}
inline const mpreal operator-(const double b, const mpreal& a)
@@ -1379,7 +1379,7 @@ inline mpreal& mpreal::operator*=(const int v) inline const mpreal operator*(const mpreal& a, const mpreal& b)
{
- mpreal c(0, std::max(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
+ mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
mpfr_mul(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
return c;
}
@@ -1455,7 +1455,7 @@ inline mpreal& mpreal::operator/=(const int v) inline const mpreal operator/(const mpreal& a, const mpreal& b)
{
- mpreal c(0, std::max(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
+ mpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));
mpfr_div(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());
return c;
}
@@ -2393,7 +2393,7 @@ inline const mpreal const_catalan (mp_prec_t p, mp_rnd_t r) return x;
}
-inline const mpreal const_infinity (int sign, mp_prec_t p, mp_rnd_t r)
+inline const mpreal const_infinity (int sign, mp_prec_t p, mp_rnd_t /*r*/)
{
mpreal x(0, p);
mpfr_set_inf(x.mpfr_ptr(), sign);
|