]>
Commit | Line | Data |
---|---|---|
650425ce UD |
1 | /* |
2 | * wrapper exp2l(x) | |
3 | */ | |
4 | ||
9d13fb24 | 5 | #include <math.h> |
9277c064 | 6 | #include <math_private.h> |
813378e9 | 7 | #include <math-svid-compat.h> |
92892fdb | 8 | #include <libm-alias-ldouble.h> |
650425ce | 9 | |
4f3647e4 | 10 | #if LIBM_SVID_COMPAT |
650425ce | 11 | long double |
0ac5ae23 | 12 | __exp2l (long double x) |
650425ce | 13 | { |
0cb7efc5 | 14 | long double z = __ieee754_exp2l (x); |
d81f90cc WD |
15 | if (__builtin_expect (!isfinite (z) || z == 0, 0) |
16 | && isfinite (x) && _LIB_VERSION != _IEEE_) | |
0ac5ae23 | 17 | /* exp2 overflow: 244, exp2 underflow: 245 */ |
d81f90cc | 18 | return __kernel_standard_l (x, x, 244 + !!signbit (x)); |
0ac5ae23 | 19 | |
0cb7efc5 | 20 | return z; |
650425ce | 21 | } |
92892fdb | 22 | libm_alias_ldouble (__exp2, exp2) |
4f3647e4 | 23 | #endif |