Optimize tr_freehook
[glibc.git] / math / w_exp2l.c
blobac8d231e2c69e408ded8260bcf626de328a38896
1 /*
2 * wrapper exp2l(x)
3 */
5 #include <float.h>
6 #include <math.h>
7 #include <math_private.h>
9 static const long double o_threshold = (long double) LDBL_MAX_EXP;
10 static const long double u_threshold
11 = (long double) (LDBL_MIN_EXP - LDBL_MANT_DIG - 1);
13 long double
14 __exp2l (long double x)
16 if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
17 && _LIB_VERSION != _IEEE_ && __finitel (x))
18 /* exp2 overflow: 244, exp2 underflow: 245 */
19 return __kernel_standard (x, x, 244 + (x <= o_threshold));
21 return __ieee754_exp2l (x);
23 weak_alias (__exp2l, exp2l)