summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authorkargl <kargl@FreeBSD.org>2012-07-26 03:59:33 +0000
committerkargl <kargl@FreeBSD.org>2012-07-26 03:59:33 +0000
commitda1349053f2cae9f35535b9a0d84c5bb437bcaed (patch)
treefe1af28d025081ca7868ee218b86bf19734c36a9 /lib/msun
parent20f821c4653c4a0a7821eccf56ed51ea2fd835a8 (diff)
downloadFreeBSD-src-da1349053f2cae9f35535b9a0d84c5bb437bcaed.zip
FreeBSD-src-da1349053f2cae9f35535b9a0d84c5bb437bcaed.tar.gz
* ld80/expl.c:
. Remove a few #ifdefs that should have been removed in the initial commit. . Sort fpmath.h to its rightful place. * ld128/s_expl.c: . Replace EXPMASK with its actual value. . Sort fpmath.h to its rightful place. Requested by: bde Approved by: das (mentor)
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/ld128/s_expl.c5
-rw-r--r--lib/msun/ld80/s_expl.c6
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/msun/ld128/s_expl.c b/lib/msun/ld128/s_expl.c
index 624cb8d..1888ef8 100644
--- a/lib/msun/ld128/s_expl.c
+++ b/lib/msun/ld128/s_expl.c
@@ -29,12 +29,11 @@ __FBSDID("$FreeBSD$");
#include <float.h>
+#include "fpmath.h"
#include "math.h"
#include "math_private.h"
-#include "fpmath.h"
#define BIAS (LDBL_MAX_EXP - 1)
-#define EXPMASK (BIAS + LDBL_MAX_EXP)
static volatile const long double twom10000 = 0x1p-10000L, tiny = 0x1p-10000L;
@@ -205,7 +204,7 @@ expl(long double x)
/* Filter out exceptional cases. */
u.e = x;
hx = u.xbits.expsign;
- ix = hx & EXPMASK;
+ ix = hx & 0x7fff;
if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */
if (ix == BIAS + LDBL_MAX_EXP) {
if (u.xbits.manh != 0
diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c
index d2faad2..e295473 100644
--- a/lib/msun/ld80/s_expl.c
+++ b/lib/msun/ld80/s_expl.c
@@ -45,13 +45,9 @@ __FBSDID("$FreeBSD$");
#include <ieeefp.h>
#endif
+#include "fpmath.h"
#include "math.h"
-#define FPSETPREC
-#ifdef NO_FPSETPREC
-#undef FPSETPREC
-#endif
#include "math_private.h"
-#include "fpmath.h"
#define BIAS (LDBL_MAX_EXP - 1)
OpenPOWER on IntegriCloud