6 #include <math_private.h>
7 #include <math-svid-compat.h>
8 #include <libm-alias-double.h>
10 #if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_29) \
11 || defined NO_LONG_DOUBLE \
12 || defined LONG_DOUBLE_COMPAT)
14 __exp2_compat (double x
)
16 double z
= __ieee754_exp2 (x
);
17 if (__builtin_expect (!isfinite (z
) || z
== 0, 0)
18 && isfinite (x
) && _LIB_VERSION
!= _IEEE_
)
19 /* exp2 overflow: 44, exp2 underflow: 45 */
20 return __kernel_standard (x
, x
, 44 + !!signbit (x
));
24 # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_29)
25 compat_symbol (libm
, __exp2_compat
, exp2
, GLIBC_2_1
);
27 # ifdef NO_LONG_DOUBLE
28 weak_alias (__exp2_compat
, exp2l
)
30 # ifdef LONG_DOUBLE_COMPAT
31 /* Work around gas bug "multiple versions for symbol". */
32 weak_alias (__exp2_compat
, __exp2_compat_alias
)
34 LONG_DOUBLE_COMPAT_CHOOSE_libm_exp2l (
35 compat_symbol (libm
, __exp2_compat_alias
, exp2l
, FIRST_VERSION_libm_exp2l
), );