]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: Use internal fesetround alias on fma
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 25 Aug 2025 16:38:32 +0000 (13:38 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 11 Sep 2025 17:46:07 +0000 (14:46 -0300)
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>
sysdeps/ieee754/ldbl-128/s_fma.c
sysdeps/ieee754/ldbl-128/s_fmal.c
sysdeps/ieee754/ldbl-96/s_fma.c
sysdeps/ieee754/ldbl-96/s_fmal.c

index a5466b67c59c3ba3d31b3e4c1519ad119ae0dcb2..01ca556260884553e2406581e94214730ce1f6eb 100644 (file)
@@ -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)
index f52a21306d31ae71cf99105af438285e00a55db6..17ad90ca31065efa944e21044e442db3b733f9b4 100644 (file)
@@ -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;
 
index 9723c5a79799e2fbdf2f1b9561346713d9f99273..a9abf8f1de2f8e48ddefe39f1c491af929f58e81 100644 (file)
@@ -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;
 
index c923bc9fff54388c5854b177bf04fe0273b8356e..be5528d96bce664b5d3f006ad2d192ef8e7b0058 100644 (file)
@@ -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;