]> git.ipfire.org Git - thirdparty/glibc.git/blame - math/w_exp2_compat.c
Obsolete matherr, _LIB_VERSION, libieee.a.
[thirdparty/glibc.git] / math / w_exp2_compat.c
CommitLineData
650425ce
UD
1/*
2 * wrapper exp2(x)
3 */
4
9d13fb24 5#include <math.h>
9277c064 6#include <math_private.h>
813378e9 7#include <math-svid-compat.h>
650425ce 8
650425ce 9double
0ac5ae23 10__exp2 (double x)
650425ce 11{
0cb7efc5 12 double z = __ieee754_exp2 (x);
d81f90cc
WD
13 if (__builtin_expect (!isfinite (z) || z == 0, 0)
14 && isfinite (x) && _LIB_VERSION != _IEEE_)
0ac5ae23 15 /* exp2 overflow: 44, exp2 underflow: 45 */
d81f90cc 16 return __kernel_standard (x, x, 44 + !!signbit (x));
0ac5ae23 17
0cb7efc5 18 return z;
650425ce
UD
19}
20weak_alias (__exp2, exp2)
21#ifdef NO_LONG_DOUBLE
becf77cd
RM
22strong_alias (__exp2, __exp2l)
23weak_alias (__exp2, exp2l)
650425ce 24#endif