public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2024-02-07 14:14 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:14 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c16ba7dc012dcecf73a058f00be5e44f416753b1

commit c16ba7dc012dcecf73a058f00be5e44f416753b1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2025-11-20 18:29 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2025-11-20 18:29 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9eb3cb13da7b16619e4ec03caa50f45e0ecebeb0

commit 9eb3cb13da7b16619e4ec03caa50f45e0ecebeb0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    If fixes the following issues when testcase is built with clang:
    
    FAIL: math/test-ldouble-erf
    Failure: erf (-0x4p-16384): Exception "Underflow" set
    Failure: erf (0x1p-10000): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf (0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x1p-10000): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_downward (0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (-0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x1p-10000): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x1p-10000): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_upward (0x4p-16384): Exception "Underflow" set
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2025-10-28 17:10 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2025-10-28 17:10 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4d2a68a94c6a32923ad1499e1cf0d0e16dfacd6f

commit 4d2a68a94c6a32923ad1499e1cf0d0e16dfacd6f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    If fixes the following issues when testcase is built with clang:
    
    FAIL: math/test-ldouble-erf
    Failure: erf (-0x4p-16384): Exception "Underflow" set
    Failure: erf (0x1p-10000): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf (0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x1p-10000): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_downward (0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (-0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x1p-10000): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x1p-10000): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_upward (0x4p-16384): Exception "Underflow" set
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2025-10-17 19:16 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2025-10-17 19:16 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3e9a11160e578cacbe63d4705061dc66503d2db0

commit 3e9a11160e578cacbe63d4705061dc66503d2db0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    If fixes the following issues when testcase is built with clang:
    
    FAIL: math/test-ldouble-erf
    Failure: erf (-0x4p-16384): Exception "Underflow" set
    Failure: erf (0x1p-10000): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf (0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x1p-10000): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_downward (0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (-0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x1p-10000): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x1p-10000): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_upward (0x4p-16384): Exception "Underflow" set
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2025-04-10 18:16 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2025-04-10 18:16 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4a9da6022eb2e563a77f9a9c5ee649f01a9488c3

commit 4a9da6022eb2e563a77f9a9c5ee649f01a9488c3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    If fixes the following issues when testcase is built with clang:
    
    FAIL: math/test-ldouble-erf
    Failure: erf (-0x4p-16384): Exception "Underflow" set
    Failure: erf (0x1p-10000): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf (0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x1p-10000): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_downward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_downward (0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (-0x4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x1p-10000): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_towardzero (0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (-0x4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x1p-10000): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb84p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f38760a41abb88p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f4p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded54f8p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded5518p-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded551cp-16384): Exception "Underflow" set
    Failure: erf_upward (0x3.8b7f12369ded552p-16384): Exception "Underflow" set
    Failure: erf_upward (0x4p-16384): Exception "Underflow" set
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2025-03-25 20:26 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2025-03-25 20:26 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=71ac64b83c2d2a10031d752b07201174157b978b

commit 71ac64b83c2d2a10031d752b07201174157b978b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2024-04-17 20:14 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:14 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3199b1cc5b9f2ca0714b803b66f4a24e0fa2aa21

commit 3199b1cc5b9f2ca0714b803b66f4a24e0fa2aa21
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2024-04-02 16:00 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 16:00 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=eef3863d08a6b5cdc31b7bf2a8186f0c535eb520

commit eef3863d08a6b5cdc31b7bf2a8186f0c535eb520
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl
@ 2024-02-09 17:39 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:39 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=102f6424791ee49c9600898dc9312ba278a7f8c5

commit 102f6424791ee49c9600898dc9312ba278a7f8c5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 30 13:45:14 2024 +0000

    math: Fix potential underflow on ldbl-128 erfl
    
    The multiplication is only required if the branch is taken, and the
    compiler might not optimize it away.
    
    Checked on aarch64-linux-gnu with gcc and clang.

Diff:
---
 sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 1cbedc249d..e52d88bde3 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -778,7 +778,6 @@ __erfl (_Float128 x)
     }
   u.parts32.w0 = ix;
   a = u.value;
-  z = x * x;
   if (ix < 0x3ffec000)  /* a < 0.875 */
     {
       if (ix < 0x3fc60000) /* |x|<2**-57 */
@@ -792,6 +791,7 @@ __erfl (_Float128 x)
 	    }
 	  return x + efx * x;
 	}
+      z = x * x;
       y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1);
     }
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-11-20 18:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-07 14:14 [glibc/azanella/clang] math: Fix potential underflow on ldbl-128 erfl Adhemerval Zanella
2024-02-09 17:39 Adhemerval Zanella
2024-04-02 16:00 Adhemerval Zanella
2024-04-17 20:14 Adhemerval Zanella
2025-03-25 20:26 Adhemerval Zanella
2025-04-10 18:16 Adhemerval Zanella
2025-10-17 19:16 Adhemerval Zanella
2025-10-28 17:10 Adhemerval Zanella
2025-11-20 18:29 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).