]> git.ipfire.org Git - thirdparty/glibc.git/blame - math/w_exp2f_compat.c
Use '%z' instead of '%Z' on printf functions
[thirdparty/glibc.git] / math / w_exp2f_compat.c
CommitLineData
650425ce
UD
1/*
2 * wrapper exp2f(x)
3 */
4
9d13fb24 5#include <math.h>
9277c064 6#include <math_private.h>
813378e9 7#include <math-svid-compat.h>
650425ce 8
f5f0f526 9#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
650425ce 10float
f5f0f526 11__exp2f_compat (float x)
650425ce 12{
0cb7efc5 13 float z = __ieee754_exp2f (x);
d81f90cc
WD
14 if (__builtin_expect (!isfinite (z) || z == 0, 0)
15 && isfinite (x) && _LIB_VERSION != _IEEE_)
0ac5ae23 16 /* exp2 overflow: 144, exp2 underflow: 145 */
d81f90cc 17 return __kernel_standard_f (x, x, 144 + !!signbit (x));
0ac5ae23 18
0cb7efc5 19 return z;
650425ce 20}
f5f0f526 21compat_symbol (libm, __exp2f_compat, exp2f, GLIBC_2_1);
4f3647e4 22#endif