summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-06-24 19:12:17 +0000
committereadler <eadler@FreeBSD.org>2013-06-24 19:12:17 +0000
commit939aa4a29f5afbab4c4230e3075649b0870ae5ee (patch)
treebbd317452f1e30351518a276c04a737db2418d7b /lib/msun
parent5be6531fa515a5ffc18308909ce829b2082904c7 (diff)
downloadFreeBSD-src-939aa4a29f5afbab4c4230e3075649b0870ae5ee.zip
FreeBSD-src-939aa4a29f5afbab4c4230e3075649b0870ae5ee.tar.gz
Make the order of operations for lib/msun more clear.
Tested with md5 sum of object code Reported by: swildner@DragonFlyBSD.org Submitted by: bde
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/s_fma.c2
-rw-r--r--lib/msun/src/s_fmal.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c
index 452bece..b1066c2 100644
--- a/lib/msun/src/s_fma.c
+++ b/lib/msun/src/s_fma.c
@@ -117,7 +117,7 @@ add_and_denormalize(double a, double b, int scale)
if (sum.lo != 0) {
EXTRACT_WORD64(hibits, sum.hi);
bits_lost = -((int)(hibits >> 52) & 0x7ff) - scale + 1;
- if (bits_lost != 1 ^ (int)(hibits & 1)) {
+ if ((bits_lost != 1) ^ (int)(hibits & 1)) {
/* hibits += (int)copysign(1.0, sum.hi * sum.lo) */
EXTRACT_WORD64(lobits, sum.lo);
hibits += 1 - (((hibits ^ lobits) >> 62) & 2);
diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c
index 9271901..d435f4f 100644
--- a/lib/msun/src/s_fmal.c
+++ b/lib/msun/src/s_fmal.c
@@ -113,7 +113,7 @@ add_and_denormalize(long double a, long double b, int scale)
if (sum.lo != 0) {
u.e = sum.hi;
bits_lost = -u.bits.exp - scale + 1;
- if (bits_lost != 1 ^ (int)(u.bits.manl & 1))
+ if ((bits_lost != 1) ^ (int)(u.bits.manl & 1))
sum.hi = nextafterl(sum.hi, INFINITY * sum.lo);
}
return (ldexp(sum.hi, scale));
OpenPOWER on IntegriCloud