mirror of git://sourceware.org/git/glibc.git
math: Use internal fesetround alias on fma
To avoid linknamespace issues on old standards. It is required if the fallback fma implementation is used if/when it is also used internally for other implementation. Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
parent
adecb3bec1
commit
f40cdb65f5
|
|
@ -51,7 +51,7 @@ __fma (double x, double y, double z)
|
|||
|
||||
union ieee854_long_double u;
|
||||
__feholdexcept (&env);
|
||||
fesetround (FE_TOWARDZERO);
|
||||
__fesetround (FE_TOWARDZERO);
|
||||
/* Perform addition with round to odd. */
|
||||
u.d = temp + (long double) z;
|
||||
if ((u.ieee.mantissa3 & 1) == 0 && u.ieee.exponent != 0x7fff)
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ __fmal (_Float128 x, _Float128 y, _Float128 z)
|
|||
|
||||
fenv_t env;
|
||||
__feholdexcept (&env);
|
||||
fesetround (FE_TONEAREST);
|
||||
__fesetround (FE_TONEAREST);
|
||||
|
||||
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
|
||||
#define C ((1LL << (LDBL_MANT_DIG + 1) / 2) + 1)
|
||||
|
|
@ -229,7 +229,7 @@ __fmal (_Float128 x, _Float128 y, _Float128 z)
|
|||
return z + m1;
|
||||
}
|
||||
|
||||
fesetround (FE_TOWARDZERO);
|
||||
__fesetround (FE_TOWARDZERO);
|
||||
/* Perform m2 + a2 addition with round to odd. */
|
||||
u.d = a2 + m2;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ __fma (double x, double y, double z)
|
|||
|
||||
fenv_t env;
|
||||
__feholdexcept (&env);
|
||||
fesetround (FE_TONEAREST);
|
||||
__fesetround (FE_TONEAREST);
|
||||
|
||||
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
|
||||
#define C ((1ULL << (LDBL_MANT_DIG + 1) / 2) + 1)
|
||||
|
|
@ -86,7 +86,7 @@ __fma (double x, double y, double z)
|
|||
return z + m1;
|
||||
}
|
||||
|
||||
fesetround (FE_TOWARDZERO);
|
||||
__fesetround (FE_TOWARDZERO);
|
||||
/* Perform m2 + a2 addition with round to odd. */
|
||||
a2 = a2 + m2;
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ __fmal (long double x, long double y, long double z)
|
|||
|
||||
fenv_t env;
|
||||
__feholdexcept (&env);
|
||||
fesetround (FE_TONEAREST);
|
||||
__fesetround (FE_TONEAREST);
|
||||
|
||||
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
|
||||
#define C ((1LL << (LDBL_MANT_DIG + 1) / 2) + 1)
|
||||
|
|
@ -219,7 +219,7 @@ __fmal (long double x, long double y, long double z)
|
|||
return z + m1;
|
||||
}
|
||||
|
||||
fesetround (FE_TOWARDZERO);
|
||||
__fesetround (FE_TOWARDZERO);
|
||||
/* Perform m2 + a2 addition with round to odd. */
|
||||
u.d = a2 + m2;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue