diff options
author | kargl <kargl@FreeBSD.org> | 2013-06-03 18:57:35 +0000 |
---|---|---|
committer | kargl <kargl@FreeBSD.org> | 2013-06-03 18:57:35 +0000 |
commit | 1f81e8e0a39d8b471b432e644a47a090d7505e25 (patch) | |
tree | 5a63cbb139fce4cfcbd44bef5fb48145388cca31 | |
parent | 94cb7ae86be9a73b845250368d2a4060055ccc10 (diff) | |
download | FreeBSD-src-1f81e8e0a39d8b471b432e644a47a090d7505e25.zip FreeBSD-src-1f81e8e0a39d8b471b432e644a47a090d7505e25.tar.gz |
Micro-optimization: move the unary mius operator to operate
on a literal constant.
Obtained from: bde
-rw-r--r-- | lib/msun/ld128/s_expl.c | 2 | ||||
-rw-r--r-- | lib/msun/ld80/s_expl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/msun/ld128/s_expl.c b/lib/msun/ld128/s_expl.c index a36d7af..a379ff0 100644 --- a/lib/msun/ld128/s_expl.c +++ b/lib/msun/ld128/s_expl.c @@ -261,7 +261,7 @@ expl(long double x) n2 = (unsigned)n % INTERVALS; k = n >> LOG2_INTERVALS; r1 = x - fn * L1; - r2 = -fn * L2; + r2 = fn * -L2; /* Prepare scale factors. */ v.xbits.manh = 0; diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c index 26a378b..79c5110 100644 --- a/lib/msun/ld80/s_expl.c +++ b/lib/msun/ld80/s_expl.c @@ -275,10 +275,10 @@ expl(long double x) /* Depend on the sign bit being propagated: */ k = n >> LOG2_INTERVALS; r1 = x - fn * L1; - r2 = -fn * L2; + r2 = fn * -L2; /* Prepare scale factors. */ - v.xbits.man = 1ULL << 63; + v.e = 1ULL << 63; if (k >= LDBL_MIN_EXP) { v.xbits.expsign = BIAS + k; twopk = v.e; |