* sysdeps/m68k/dl-machine.h (RTLD_START): Readd _dl_start_user
[glibc/pb-stable.git] / math / w_exp2.c
blob126aa090bc52feb0d2b019d5045286fcba278975
1 /*
2 * wrapper exp2(x)
3 */
5 #include <float.h>
6 #include "math.h"
7 #include "math_private.h"
9 static const double o_threshold= (double) DBL_MAX_EXP;
10 static const double u_threshold= (double) DBL_MIN_EXP;
12 double
13 __exp2 (double x) /* wrapper exp2 */
15 #ifdef _IEEE_LIBM
16 return __ieee754_exp2 (x);
17 #else
18 double z;
19 z = __ieee754_exp2 (x);
20 if (_LIB_VERSION != _IEEE_ && __finite (x))
22 if (x > o_threshold)
23 /* exp2 overflow */
24 return __kernel_standard (x, x, 44);
25 else if (x < u_threshold)
26 /* exp2 underflow */
27 return __kernel_standard (x, x, 45);
29 return z;
30 #endif
32 weak_alias (__exp2, exp2)
33 #ifdef NO_LONG_DOUBLE
34 strong_alias (__exp2, __expl2)
35 weak_alias (__exp2, expl2)
36 #endif