diff options
author | eadler <eadler@FreeBSD.org> | 2013-06-24 19:12:17 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2013-06-24 19:12:17 +0000 |
commit | 939aa4a29f5afbab4c4230e3075649b0870ae5ee (patch) | |
tree | bbd317452f1e30351518a276c04a737db2418d7b /lib/msun | |
parent | 5be6531fa515a5ffc18308909ce829b2082904c7 (diff) | |
download | FreeBSD-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.c | 2 | ||||
-rw-r--r-- | lib/msun/src/s_fmal.c | 2 |
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)); |