mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
math: remove exp10 wrappers
Remove the error handling wrapper from exp10. This is very similar to the changes done to exp and exp2, except that we also need to handle pow10 and pow10l. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
7c14d8a985
commit
08ddd26814
@ -635,4 +635,8 @@ libm {
|
|||||||
# No SVID compatible error handling.
|
# No SVID compatible error handling.
|
||||||
fmod; fmodf;
|
fmod; fmodf;
|
||||||
}
|
}
|
||||||
|
GLIBC_2.39 {
|
||||||
|
# No SVID compatible error handling.
|
||||||
|
exp10;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,15 @@
|
|||||||
#include <math-svid-compat.h>
|
#include <math-svid-compat.h>
|
||||||
#include <libm-alias-double.h>
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
#if LIBM_SVID_COMPAT
|
#ifndef NO_COMPAT_NEEDED
|
||||||
|
# define NO_COMPAT_NEEDED 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_39) \
|
||||||
|
|| defined NO_LONG_DOUBLE \
|
||||||
|
|| defined LONG_DOUBLE_COMPAT)
|
||||||
double
|
double
|
||||||
__exp10 (double x)
|
__exp10_compat (double x)
|
||||||
{
|
{
|
||||||
double z = __ieee754_exp10 (x);
|
double z = __ieee754_exp10 (x);
|
||||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||||
@ -37,14 +43,30 @@ __exp10 (double x)
|
|||||||
|
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
libm_alias_double (__exp10, exp10)
|
# if NO_COMPAT_NEEDED
|
||||||
|
# ifdef SHARED
|
||||||
|
libm_alias_double (__exp10_compat, exp10)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_39)
|
||||||
|
compat_symbol (libm, __exp10_compat, exp10, GLIBC_2_1);
|
||||||
|
# endif
|
||||||
|
# ifdef NO_LONG_DOUBLE
|
||||||
|
weak_alias (__exp10_compat, exp10l)
|
||||||
|
# endif
|
||||||
|
# ifdef LONG_DOUBLE_COMPAT
|
||||||
|
LONG_DOUBLE_COMPAT_CHOOSE_libm_exp10l (
|
||||||
|
compat_symbol (libm, __exp10_compat, exp10l, FIRST_VERSION_libm_exp10l), );
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
|
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
|
||||||
strong_alias (__exp10, __pow10)
|
strong_alias (__exp10_compat, __pow10)
|
||||||
compat_symbol (libm, __pow10, pow10, GLIBC_2_1);
|
compat_symbol (libm, __pow10, pow10, GLIBC_2_1);
|
||||||
# endif
|
# endif
|
||||||
# ifdef NO_LONG_DOUBLE
|
# ifdef NO_LONG_DOUBLE
|
||||||
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
|
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
|
||||||
strong_alias (__exp10l, __pow10l)
|
strong_alias (exp10l, __pow10l)
|
||||||
compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
|
compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
3
sysdeps/i386/fpu/w_exp10_compat.c
Normal file
3
sysdeps/i386/fpu/w_exp10_compat.c
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/* i386 provides an optimized __ieee754_exp10. */
|
||||||
|
#define NO_COMPAT_NEEDED 1
|
||||||
|
#include <math/w_exp10_compat.c>
|
@ -18,9 +18,9 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math-barriers.h>
|
#include <math-barriers.h>
|
||||||
#include <math-narrow-eval.h>
|
#include <math-narrow-eval.h>
|
||||||
#include <math_private.h>
|
#include <math-svid-compat.h>
|
||||||
#include <float.h>
|
|
||||||
#include <libm-alias-finite.h>
|
#include <libm-alias-finite.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
#include "math_config.h"
|
#include "math_config.h"
|
||||||
|
|
||||||
#define N (1 << EXP_TABLE_BITS)
|
#define N (1 << EXP_TABLE_BITS)
|
||||||
@ -75,7 +75,7 @@ special_case (uint64_t sbits, double_t tmp, uint64_t ki)
|
|||||||
|
|
||||||
/* Double-precision 10^x approximation. Largest observed error is ~0.513 ULP. */
|
/* Double-precision 10^x approximation. Largest observed error is ~0.513 ULP. */
|
||||||
double
|
double
|
||||||
__ieee754_exp10 (double x)
|
__exp10 (double x)
|
||||||
{
|
{
|
||||||
uint64_t ix = asuint64 (x);
|
uint64_t ix = asuint64 (x);
|
||||||
uint32_t abstop = (ix >> 52) & 0x7ff;
|
uint32_t abstop = (ix >> 52) & 0x7ff;
|
||||||
@ -144,4 +144,11 @@ __ieee754_exp10 (double x)
|
|||||||
return s * y + s;
|
return s * y + s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strong_alias (__exp10, __ieee754_exp10)
|
||||||
libm_alias_finite (__ieee754_exp10, __exp10)
|
libm_alias_finite (__ieee754_exp10, __exp10)
|
||||||
|
#if LIBM_SVID_COMPAT
|
||||||
|
versioned_symbol (libm, __exp10, exp10, GLIBC_2_39);
|
||||||
|
libm_alias_double_other (__exp10, exp10)
|
||||||
|
#else
|
||||||
|
libm_alias_double (__exp10, exp10)
|
||||||
|
#endif
|
||||||
|
1
sysdeps/ieee754/dbl-64/w_exp10.c
Normal file
1
sysdeps/ieee754/dbl-64/w_exp10.c
Normal file
@ -0,0 +1 @@
|
|||||||
|
/* Not needed. */
|
3
sysdeps/m68k/m680x0/fpu/w_exp10_compat.c
Normal file
3
sysdeps/m68k/m680x0/fpu/w_exp10_compat.c
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/* m68k provides an optimized __ieee754_exp10. */
|
||||||
|
#define NO_COMPAT_NEEDED 1
|
||||||
|
#include <math/w_exp10_compat.c>
|
@ -1148,3 +1148,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -1205,6 +1205,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -535,6 +535,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 _LIB_VERSION D 0x4
|
GLIBC_2.4 _LIB_VERSION D 0x4
|
||||||
GLIBC_2.4 __clog10 F
|
GLIBC_2.4 __clog10 F
|
||||||
GLIBC_2.4 __clog10f F
|
GLIBC_2.4 __clog10f F
|
||||||
|
@ -535,6 +535,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 _LIB_VERSION D 0x4
|
GLIBC_2.4 _LIB_VERSION D 0x4
|
||||||
GLIBC_2.4 __clog10 F
|
GLIBC_2.4 __clog10 F
|
||||||
GLIBC_2.4 __clog10f F
|
GLIBC_2.4 __clog10f F
|
||||||
|
@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 exp2l F
|
GLIBC_2.4 exp2l F
|
||||||
|
@ -535,6 +535,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 _LIB_VERSION D 0x4
|
GLIBC_2.4 _LIB_VERSION D 0x4
|
||||||
GLIBC_2.4 __clog10 F
|
GLIBC_2.4 __clog10 F
|
||||||
GLIBC_2.4 __clog10f F
|
GLIBC_2.4 __clog10f F
|
||||||
|
@ -847,3 +847,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -847,3 +847,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 exp2l F
|
GLIBC_2.4 exp2l F
|
||||||
|
@ -1148,3 +1148,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -847,3 +847,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -892,6 +892,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -891,6 +891,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -885,6 +885,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -1320,3 +1320,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -1149,6 +1149,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -1149,6 +1149,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 exp2l F
|
GLIBC_2.4 exp2l F
|
||||||
|
@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 exp2l F
|
GLIBC_2.4 exp2l F
|
||||||
|
@ -1156,6 +1156,7 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
GLIBC_2.4 __clog10l F
|
GLIBC_2.4 __clog10l F
|
||||||
GLIBC_2.4 __finitel F
|
GLIBC_2.4 __finitel F
|
||||||
GLIBC_2.4 __fpclassifyl F
|
GLIBC_2.4 __fpclassifyl F
|
||||||
|
@ -1148,3 +1148,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -1181,3 +1181,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
@ -1181,3 +1181,4 @@ GLIBC_2.35 hypot F
|
|||||||
GLIBC_2.35 hypotf F
|
GLIBC_2.35 hypotf F
|
||||||
GLIBC_2.38 fmod F
|
GLIBC_2.38 fmod F
|
||||||
GLIBC_2.38 fmodf F
|
GLIBC_2.38 fmodf F
|
||||||
|
GLIBC_2.39 exp10 F
|
||||||
|
Loading…
Reference in New Issue
Block a user