Update.
[glibc.git] / math / w_exp2l.c
blob965e9bf3e44e7c4236938b7647bb3e8efa14159b
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 = (long double) LDBL_MIN_EXP;
12 long double
13 __exp2l (long double x) /* wrapper exp2l */
15 #ifdef _IEEE_LIBM
16 return __ieee754_exp2l (x);
17 #else
18 long double z;
19 z = __ieee754_exp2l (x);
20 if (_LIB_VERSION != _IEEE_ && __finitel (x))
22 if (x > o_threshold)
23 return __kernel_standard (x, x, 244); /* exp2l overflow */
24 else if (x < u_threshold)
25 return __kernel_standard (x, x, 245); /* exp2l underflow */
27 return z;
28 #endif
30 weak_alias (__exp2l, exp2l)