aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-03-07 13:25:02 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-03-07 13:25:02 +0530
commitce544b5bda86f0a42b7f88906faf745926423720 (patch)
tree73e9d3e89a5ac68ca0f9b78fbdee25aaae4519fa /sysdeps/ieee754/dbl-64
parent4cc149fd8e96e42515638350fb13887b0d85cdb6 (diff)
downloadglibc-ce544b5bda86f0a42b7f88906faf745926423720.tar
glibc-ce544b5bda86f0a42b7f88906faf745926423720.tar.gz
glibc-ce544b5bda86f0a42b7f88906faf745926423720.tar.bz2
glibc-ce544b5bda86f0a42b7f88906faf745926423720.zip
Merge powerpc slowexp.c into generic code
Diffstat (limited to 'sysdeps/ieee754/dbl-64')
-rw-r--r--sysdeps/ieee754/dbl-64/slowexp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c
index c423fc3115..8f353f634f 100644
--- a/sysdeps/ieee754/dbl-64/slowexp.c
+++ b/sysdeps/ieee754/dbl-64/slowexp.c
@@ -27,20 +27,23 @@
/*Converting from double precision to Multi-precision and calculating */
/* e^x */
/**************************************************************************/
-#include "mpa.h"
#include <math_private.h>
+#ifndef USE_LONG_DOUBLE_FOR_MP
+# include "mpa.h"
+void __mpexp (mp_no *x, mp_no *y, int p);
+#endif
+
#ifndef SECTION
# define SECTION
#endif
-void __mpexp (mp_no *x, mp_no *y, int p);
-
/*Converting from double precision to Multi-precision and calculating e^x */
double
SECTION
__slowexp (double x)
{
+#ifndef USE_LONG_DOUBLE_FOR_MP
double w, z, res, eps = 3.0e-26;
int p;
mp_no mpx, mpy, mpz, mpw, mpeps, mpcor;
@@ -66,4 +69,7 @@ __slowexp (double x)
__mp_dbl (&mpy, &res, p);
return res;
}
+#else
+ return (double) __ieee754_expl((long double)x);
+#endif
}