mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-19 14:32:35 +00:00
Fix some invalid comparisons (GCC compiler errors).
[SVN r85573]
This commit is contained in:
@@ -477,7 +477,7 @@ inline void eval_subtract(mpfi_float_backend<D1>& result, const mpfi_float_backe
|
||||
template <unsigned D1, unsigned D2>
|
||||
inline void eval_multiply(mpfi_float_backend<D1>& result, const mpfi_float_backend<D2>& o)
|
||||
{
|
||||
if(&result == &o)
|
||||
if((void*)&result == (void*)&o)
|
||||
mpfi_sqr(result.data(), o.data());
|
||||
else
|
||||
mpfi_mul(result.data(), result.data(), o.data());
|
||||
@@ -612,7 +612,7 @@ inline void eval_subtract(mpfi_float_backend<D1>& a, long x, const mpfi_float_ba
|
||||
template <unsigned D1, unsigned D2, unsigned D3>
|
||||
inline void eval_multiply(mpfi_float_backend<D1>& a, const mpfi_float_backend<D2>& x, const mpfi_float_backend<D3>& y)
|
||||
{
|
||||
if(&x == &y)
|
||||
if((void*)&x == (void*)&y)
|
||||
mpfi_sqr(a.data(), x.data());
|
||||
else
|
||||
mpfi_mul(a.data(), x.data(), y.data());
|
||||
|
||||
@@ -952,7 +952,7 @@ inline void eval_subtract(mpfr_float_backend<D1, A1>& result, const mpfr_float_b
|
||||
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
|
||||
inline void eval_multiply(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o)
|
||||
{
|
||||
if(&o == &result)
|
||||
if((void*)&o == (void*)&result)
|
||||
mpfr_sqr(result.data(), o.data(), GMP_RNDN);
|
||||
else
|
||||
mpfr_mul(result.data(), result.data(), o.data(), GMP_RNDN);
|
||||
@@ -1087,7 +1087,7 @@ inline void eval_subtract(mpfr_float_backend<D1, A1>& a, long x, const mpfr_floa
|
||||
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2, unsigned D3>
|
||||
inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y)
|
||||
{
|
||||
if(&x == &y)
|
||||
if((void*)&x == (void*)&y)
|
||||
mpfr_sqr(a.data(), x.data(), GMP_RNDN);
|
||||
else
|
||||
mpfr_mul(a.data(), x.data(), y.data(), GMP_RNDN);
|
||||
|
||||
Reference in New Issue
Block a user