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; 4+ 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] 4+ 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; 4+ 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] 4+ 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; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2024-04-17 20:14 UTC | newest]
Thread overview: 4+ 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
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).