aboutsummaryrefslogtreecommitdiff
path: root/lib/msun
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2024-06-12 01:34:02 +0000
committerEd Maste <emaste@FreeBSD.org>2024-06-12 01:36:12 +0000
commite77ad954bb825983b4346b9cc646c9c910b1be24 (patch)
tree32ed9aa499f3210a6d78353cc01a32a68d6a0446 /lib/msun
parent92927b8bcf51dcbcf99d633c1b3cab3cab2373ac (diff)
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/s_fma.c4
-rw-r--r--lib/msun/src/s_fmal.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c
index 686e80e66f5d..16902d321290 100644
--- a/lib/msun/src/s_fma.c
+++ b/lib/msun/src/s_fma.c
@@ -267,9 +267,7 @@ fma(double x, double y, double z)
*/
fesetround(oround);
volatile double vzs = zs; /* XXX gcc CSE bug workaround */
- xs = ldexp(xy.lo, spread);
- xy.hi += vzs;
- return (xy.hi == 0 ? xs : xy.hi + xs);
+ return (xy.hi + vzs + ldexp(xy.lo, spread));
}
if (oround != FE_TONEAREST) {
diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c
index a53d85f5ca57..9d08bc72e12e 100644
--- a/lib/msun/src/s_fmal.c
+++ b/lib/msun/src/s_fmal.c
@@ -248,9 +248,7 @@ fmal(long double x, long double y, long double z)
*/
fesetround(oround);
volatile long double vzs = zs; /* XXX gcc CSE bug workaround */
- xs = ldexpl(xy.lo, spread);
- xy.hi += vzs;
- return (xy.hi == 0 ? xs : xy.hi + xs);
+ return (xy.hi + vzs + ldexpl(xy.lo, spread));
}
if (oround != FE_TONEAREST) {