aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-06-09 18:24:13 +0000
committerUlrich Drepper <drepper@redhat.com>1998-06-09 18:24:13 +0000
commit4bbac92a0a58c00a8c8c99241cde3d4a3ddb3f5c (patch)
tree4557a7d8b1e9402e5ad426280f3bcdd33a68b742
parent69f234e8ff029cdd0ee7f91df7bcd006bbcab42f (diff)
downloadglibc-4bbac92a0a58c00a8c8c99241cde3d4a3ddb3f5c.tar.xz
glibc-4bbac92a0a58c00a8c8c99241cde3d4a3ddb3f5c.zip
Update.
1998-06-09 18:16 Ulrich Drepper <drepper@cygnus.com> * math/Makefile (libm-calls): Add w_exp10 and e_exp10. * math/libm.map: Add exp10{,f,l} and pow10{,f,l}. * math/math_private.h: Add prototypes for __ieee754_exp10{,f,l}. * math/bits/mathcalls.h: Add definitions for exp10 and pow10 prototypes. * sysdeps/libm-i387/e_exp10.S: New file. * sysdeps/libm-i387/e_exp10f.S: New file. * sysdeps/libm-i387/e_exp10l.S: New file. * sysdeps/libm-ieee754/e_exp10.c: New file. * sysdeps/libm-ieee754/e_exp10f.c: New file. * sysdeps/libm-ieee754/e_exp10l.c: New file. * sysdeps/libm-ieee754/w_exp10.c: New file. * sysdeps/libm-ieee754/w_exp10f.c: New file. * sysdeps/libm-ieee754/w_exp10l.c: New file. * sysdeps/libm-ieee754/k_standard.c: Add exception code for exp10. 1998-05-25 22:18 H.J. Lu <hjl@gnu.org> * sysdeps/unix/sysv/linux/i386/Makefile (sysdep_headers): Add sys/elf.h and sys/reg.h. * sysdeps/unix/sysv/linux/i386/sys/elf.h: New file. * sysdeps/unix/sysv/linux/i386/sys/reg.h: New file. * sysdeps/unix/sysv/linux/i386/sys/procfs.h: New file. * sysdeps/unix/sysv/linux/i386/sys/user.h: New file. * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS, PTRACE_SETFPREGS): Added.
-rw-r--r--ChangeLog30
-rw-r--r--math/Makefile6
-rw-r--r--math/bits/mathcalls.h11
-rw-r--r--math/libm.map2
-rw-r--r--math/math_private.h3
-rw-r--r--sysdeps/libm-i387/e_exp10.S38
-rw-r--r--sysdeps/libm-i387/e_exp10f.S38
-rw-r--r--sysdeps/libm-i387/e_exp10l.S38
-rw-r--r--sysdeps/libm-ieee754/e_exp10.c29
-rw-r--r--sysdeps/libm-ieee754/e_exp10f.c29
-rw-r--r--sysdeps/libm-ieee754/e_exp10l.c29
-rw-r--r--sysdeps/libm-ieee754/k_standard.c40
-rw-r--r--sysdeps/libm-ieee754/w_exp10.c59
-rw-r--r--sysdeps/libm-ieee754/w_exp10f.c57
-rw-r--r--sysdeps/libm-ieee754/w_exp10l.c56
-rw-r--r--sysdeps/unix/sysv/linux/i386/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/i386/sys/elf.h60
-rw-r--r--sysdeps/unix/sysv/linux/i386/sys/procfs.h109
-rw-r--r--sysdeps/unix/sysv/linux/i386/sys/reg.h43
-rw-r--r--sysdeps/unix/sysv/linux/i386/sys/user.h86
-rw-r--r--sysdeps/unix/sysv/linux/sys/ptrace.h46
21 files changed, 788 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 059f9651f2..7436b40ef6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+1998-06-09 18:16 Ulrich Drepper <drepper@cygnus.com>
+
+ * math/Makefile (libm-calls): Add w_exp10 and e_exp10.
+ * math/libm.map: Add exp10{,f,l} and pow10{,f,l}.
+ * math/math_private.h: Add prototypes for __ieee754_exp10{,f,l}.
+ * math/bits/mathcalls.h: Add definitions for exp10 and pow10
+ prototypes.
+ * sysdeps/libm-i387/e_exp10.S: New file.
+ * sysdeps/libm-i387/e_exp10f.S: New file.
+ * sysdeps/libm-i387/e_exp10l.S: New file.
+ * sysdeps/libm-ieee754/e_exp10.c: New file.
+ * sysdeps/libm-ieee754/e_exp10f.c: New file.
+ * sysdeps/libm-ieee754/e_exp10l.c: New file.
+ * sysdeps/libm-ieee754/w_exp10.c: New file.
+ * sysdeps/libm-ieee754/w_exp10f.c: New file.
+ * sysdeps/libm-ieee754/w_exp10l.c: New file.
+ * sysdeps/libm-ieee754/k_standard.c: Add exception code for exp10.
+
+1998-05-25 22:18 H.J. Lu <hjl@gnu.org>
+
+ * sysdeps/unix/sysv/linux/i386/Makefile (sysdep_headers): Add
+ sys/elf.h and sys/reg.h.
+ * sysdeps/unix/sysv/linux/i386/sys/elf.h: New file.
+ * sysdeps/unix/sysv/linux/i386/sys/reg.h: New file.
+ * sysdeps/unix/sysv/linux/i386/sys/procfs.h: New file.
+ * sysdeps/unix/sysv/linux/i386/sys/user.h: New file.
+
+ * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_GETREGS,
+ PTRACE_SETREGS, PTRACE_GETFPREGS, PTRACE_SETFPREGS): Added.
+
1998-06-09 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/netinet/ip.h (struct ip_options): Define
diff --git a/math/Makefile b/math/Makefile
index 103937e580..9f2d3367e5 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -48,15 +48,15 @@ libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
s_floor s_frexp s_ilogb s_ldexp s_log1p s_logb \
s_modf s_nextafter s_nextafterx s_rint s_scalbn s_scalbln \
s_significand s_sin s_tan s_tanh w_acos w_acosh w_asin \
- w_atan2 w_atanh w_cosh w_drem w_exp w_exp2 w_fmod w_gamma \
- w_hypot w_j0 w_j1 w_jn w_lgamma w_lgamma_r \
+ w_atan2 w_atanh w_cosh w_drem w_exp w_exp2 w_exp10 w_fmod \
+ w_gamma w_hypot w_j0 w_j1 w_jn w_lgamma w_lgamma_r \
w_log w_log10 w_pow w_remainder w_scalb w_sinh w_sqrt \
s_signbit s_fpclassify s_fmax s_fmin s_fdim s_nan s_trunc \
s_remquo s_log2 s_exp2 s_round s_nearbyint s_sincos \
conj cimag creal cabs carg s_cexp s_csinh s_ccosh s_clog \
s_catan s_casin s_ccos s_csin s_ctan s_ctanh s_cacos \
s_casinh s_cacosh s_catanh s_csqrt s_cpow s_cproj s_clog10 \
- s_fma s_lrint s_llrint s_lround s_llround
+ s_fma s_lrint s_llrint s_lround s_llround e_exp10
libm-routines = $(libm-support) $(libm-calls) \
$(patsubst %_rf,%f_r,$(libm-calls:=f)) \
$(long-m-$(long-double-fcts))
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index 3073f25be4..67e86a7d51 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -1,5 +1,5 @@
/* Prototype declarations for math functions; helper file for <math.h>.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@
This is just like __MATHCALL but for a function returning `TYPE'
instead of `_Mdouble_'. In all of these cases, there is still
both a `NAME' and a `NAMEf' that takes `float' arguments.
-
+
Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work with -traditional. */
@@ -95,6 +95,13 @@ __MATHCALL (atanh,, (_Mdouble_ __x));
/* Exponential function of X. */
__MATHCALL (exp,, (_Mdouble_ __x));
+#ifdef __USE_GNU
+/* A function missing in all standards: compute exponent to base ten. */
+__MATHCALL (exp10,, (_Mdouble_ __x));
+/* Another name occasionally used. */
+__MATHCALL (pow10,, (_Mdouble_ __x));
+#endif
+
/* Break VALUE into a normalized fraction and an integral power of 2. */
__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
diff --git a/math/libm.map b/math/libm.map
index 9220171ae5..3fc4167213 100644
--- a/math/libm.map
+++ b/math/libm.map
@@ -72,6 +72,7 @@ GLIBC_2.1 {
# mathematical functions
exp2; exp2f; exp2l;
+ exp10; exp10f; exp10l;
fdim; fdimf; fdiml;
fma; fmaf; fmal;
fmax; fmaxf; fmaxl;
@@ -80,6 +81,7 @@ GLIBC_2.1 {
nan; nanf; nanl;
nearbyint; nearbyintf; nearbyintl;
nextafterx; nextafterxf; nextafterxl;
+ pow10; pow10f; pow10l;
remquo; remquof; remquol;
lrint; lrintf; lrintl;
llrint; llrintf; llrintl;
diff --git a/math/math_private.h b/math/math_private.h
index 4b3b5be3bf..6d51930230 100644
--- a/math/math_private.h
+++ b/math/math_private.h
@@ -253,6 +253,7 @@ extern double __ieee754_asin __P((double));
extern double __ieee754_atan2 __P((double,double));
extern double __ieee754_exp __P((double));
extern double __ieee754_exp2 __P((double));
+extern double __ieee754_exp10 __P((double));
extern double __ieee754_cosh __P((double));
extern double __ieee754_fmod __P((double,double));
extern double __ieee754_pow __P((double,double));
@@ -292,6 +293,7 @@ extern float __ieee754_asinf __P((float));
extern float __ieee754_atan2f __P((float,float));
extern float __ieee754_expf __P((float));
extern float __ieee754_exp2f __P((float));
+extern float __ieee754_exp10f __P((float));
extern float __ieee754_coshf __P((float));
extern float __ieee754_fmodf __P((float,float));
extern float __ieee754_powf __P((float,float));
@@ -330,6 +332,7 @@ extern long double __ieee754_asinl __P((long double));
extern long double __ieee754_atan2l __P((long double,long double));
extern long double __ieee754_expl __P((long double));
extern long double __ieee754_exp2l __P((long double));
+extern long double __ieee754_exp10l __P((long double));
extern long double __ieee754_coshl __P((long double));
extern long double __ieee754_fmodl __P((long double,long double));
extern long double __ieee754_powl __P((long double,long double));
diff --git a/sysdeps/libm-i387/e_exp10.S b/sysdeps/libm-i387/e_exp10.S
new file mode 100644
index 0000000000..6bfcdbb723
--- /dev/null
+++ b/sysdeps/libm-i387/e_exp10.S
@@ -0,0 +1,38 @@
+/*
+ * Written by Ulrich Drepper <drepper@cygnus.com>.
+ */
+
+#include <machine/asm.h>
+
+/* 10^x = 2^(x * log2(10)) */
+ENTRY(__ieee754_exp10)
+ fldl 4(%esp)
+/* I added the following ugly construct because exp(+-Inf) resulted
+ in NaN. The ugliness results from the bright minds at Intel.
+ For the i686 the code can be written better.
+ -- drepper@cygnus.com. */
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fldl2t
+ fmulp /* x * log2(10) */
+ fld %st
+ frndint /* int(x * log2(10)) */
+ fsubr %st,%st(1) /* fract(x * log2(10)) */
+ fxch
+ f2xm1 /* 2^(fract(x * log2(10))) - 1 */
+ fld1
+ faddp /* 2^(fract(x * log2(10))) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: ret
+END (__ieee754_exp10)
diff --git a/sysdeps/libm-i387/e_exp10f.S b/sysdeps/libm-i387/e_exp10f.S
new file mode 100644
index 0000000000..4791b99afa
--- /dev/null
+++ b/sysdeps/libm-i387/e_exp10f.S
@@ -0,0 +1,38 @@
+/*
+ * Written by Ulrich Drepper.
+ */
+
+#include <machine/asm.h>
+
+/* e^x = 2^(x * log2(10)) */
+ENTRY(__ieee754_exp10f)
+ flds 4(%esp)
+/* I added the following ugly construct because exp(+-Inf) resulted
+ in NaN. The ugliness results from the bright minds at Intel.
+ For the i686 the code can be written better.
+ -- drepper@cygnus.com. */
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fldl2t
+ fmulp /* x * log2(10) */
+ fld %st
+ frndint /* int(x * log2(10)) */
+ fsubr %st,%st(1) /* fract(x * log2(10)) */
+ fxch
+ f2xm1 /* 2^(fract(x * log2(10))) - 1 */
+ fld1
+ faddp /* 2^(fract(x * log2(10))) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: ret
+END (__ieee754_exp10f)
diff --git a/sysdeps/libm-i387/e_exp10l.S b/sysdeps/libm-i387/e_exp10l.S
new file mode 100644
index 0000000000..71f0da792d
--- /dev/null
+++ b/sysdeps/libm-i387/e_exp10l.S
@@ -0,0 +1,38 @@
+/*
+ * Written by Ulrich Drepper <drepper@cygnus.com>.
+ */
+
+#include <machine/asm.h>
+
+/* e^x = 2^(x * log2l(10)) */
+ENTRY(__ieee754_exp10l)
+ fldt 4(%esp)
+/* I added the following ugly construct because expl(+-Inf) resulted
+ in NaN. The ugliness results from the bright minds at Intel.
+ For the i686 the code can be written better.
+ -- drepper@cygnus.com. */
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fldl2t
+ fmulp /* x * log2(10) */
+ fld %st
+ frndint /* int(x * log2(10)) */
+ fsubr %st,%st(1) /* fract(x * log2(10)) */
+ fxch
+ f2xm1 /* 2^(fract(x * log2(10))) - 1 */
+ fld1
+ faddp /* 2^(fract(x * log2(10))) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: ret
+END (__ieee754_exp10l)
diff --git a/sysdeps/libm-ieee754/e_exp10.c b/sysdeps/libm-ieee754/e_exp10.c
new file mode 100644
index 0000000000..3b367641cd
--- /dev/null
+++ b/sysdeps/libm-ieee754/e_exp10.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+
+double
+__ieee754_exp10 (double arg)
+{
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_exp (M_LN10 * arg);
+}
diff --git a/sysdeps/libm-ieee754/e_exp10f.c b/sysdeps/libm-ieee754/e_exp10f.c
new file mode 100644
index 0000000000..200eecd833
--- /dev/null
+++ b/sysdeps/libm-ieee754/e_exp10f.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+
+float
+__ieee754_exp10f (float arg)
+{
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_expf (M_LN10 * arg);
+}
diff --git a/sysdeps/libm-ieee754/e_exp10l.c b/sysdeps/libm-ieee754/e_exp10l.c
new file mode 100644
index 0000000000..e2820d24f7
--- /dev/null
+++ b/sysdeps/libm-ieee754/e_exp10l.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+
+long double
+__ieee754_exp10l (long double arg)
+{
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_expl (M_LN10l * arg);
+}
diff --git a/sysdeps/libm-ieee754/k_standard.c b/sysdeps/libm-ieee754/k_standard.c
index 6c410c4c1a..aeaa50f2ee 100644
--- a/sysdeps/libm-ieee754/k_standard.c
+++ b/sysdeps/libm-ieee754/k_standard.c
@@ -83,6 +83,8 @@ static double zero = 0.0; /* used as const */
* 43-- +0**neg
* 44-- exp2 overflow
* 45-- exp2 underflow
+ * 46-- exp10 overflow
+ * 47-- exp10 underflow
*/
@@ -874,7 +876,7 @@ static double zero = 0.0; /* used as const */
/* exp(finite) overflow */
exc.type = OVERFLOW;
exc.name = type < 100 ? "exp2" : (type < 200
- ? "exp2f" : "exp2l");
+ ? "exp2f" : "exp2l");
if (_LIB_VERSION == _SVID_)
exc.retval = HUGE;
else
@@ -891,7 +893,7 @@ static double zero = 0.0; /* used as const */
/* exp(finite) underflow */
exc.type = UNDERFLOW;
exc.name = type < 100 ? "exp2" : (type < 200
- ? "exp2f" : "exp2l");
+ ? "exp2f" : "exp2l");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
__set_errno (ERANGE);
@@ -899,7 +901,39 @@ static double zero = 0.0; /* used as const */
__set_errno (ERANGE);
}
break;
- /* #### Last used is 44/144/244 ### */
+
+ case 46:
+ case 146:
+ case 246:
+ /* exp(finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = type < 100 ? "exp10" : (type < 200
+ ? "exp10f" : "exp10l");
+ if (_LIB_VERSION == _SVID_)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ __set_errno (ERANGE);
+ }
+ break;
+ case 47:
+ case 147:
+ case 247:
+ /* exp(finite) underflow */
+ exc.type = UNDERFLOW;
+ exc.name = type < 100 ? "exp10" : (type < 200
+ ? "exp10f" : "exp10l");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ __set_errno (ERANGE);
+ }
+ break;
+ /* #### Last used is 47/147/247 ### */
}
return exc.retval;
}
diff --git a/sysdeps/libm-ieee754/w_exp10.c b/sysdeps/libm-ieee754/w_exp10.c
new file mode 100644
index 0000000000..cb27159e4f
--- /dev/null
+++ b/sysdeps/libm-ieee754/w_exp10.c
@@ -0,0 +1,59 @@
+/* @(#)w_exp10.c
+ * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper exp10(x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+o_threshold= 3.0825471555991674389672e+02,
+u_threshold= -3.2360724533877978485251e+02;
+
+#ifdef __STDC__
+ double __exp10(double x) /* wrapper exp10 */
+#else
+ double __exp10(x) /* wrapper exp10 */
+ double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+ return __ieee754_exp10(x);
+#else
+ double z;
+ z = __ieee754_exp10(x);
+ if(_LIB_VERSION == _IEEE_) return z;
+ if(__finite(x)) {
+ if(x>o_threshold)
+ return __kernel_standard(x,x,46); /* exp10 overflow */
+ else if(x<u_threshold)
+ return __kernel_standard(x,x,47); /* exp10 underflow */
+ }
+ return z;
+#endif
+}
+weak_alias (__exp10, exp10)
+strong_alias (__exp10, __pow10)
+weak_alias (__pow10, pow10)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__exp10, __exp10l)
+weak_alias (__exp10, exp10l)
+strong_alias (__exp10l, __pow10l)
+weak_alias (__pow10l, pow10l)
+#endif
diff --git a/sysdeps/libm-ieee754/w_exp10f.c b/sysdeps/libm-ieee754/w_exp10f.c
new file mode 100644
index 0000000000..f78be7973b
--- /dev/null
++