1 /*
2  * wrapper exp2f(x)
3  */
4 
5 #include <math.h>
6 #include "math_private.h"
7 
8 float
exp2f(float x)9 exp2f (float x)
10 {
11 #if defined(__UCLIBC_HAS_FENV__)
12   float z = (float) pow(2.0, (double) x);
13   if (__builtin_expect (!isfinite (z) || z == 0, 0)
14       && isfinite (x) && _LIB_VERSION != _IEEE_)
15     /* exp2 overflow: 144, exp2 underflow: 145 */
16     return __kernel_standard_f (x, x, 144 + !!signbit (x));
17 
18   return z;
19 #else
20   return (float) pow(2.0, (double) x);
21 #endif
22 }
23