(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / generic / w_log2l.c
blobf41757c5e4679ab1b5253282fc99a532a61f511b
1 /*
2 * wrapper log2l(X)
3 */
5 #include "math.h"
6 #include "math_private.h"
8 long double
9 __log2l (long double x) /* wrapper log2l */
11 #ifdef _IEEE_LIBM
12 return __ieee754_log2l (x);
13 #else
14 long double z;
15 z = __ieee754_log2l (x);
16 if (_LIB_VERSION == _IEEE_ || __isnanl (x)) return z;
17 if (x <= 0.0)
19 if (x == 0.0)
20 return __kernel_standard (x, x, 248); /* log2l (0) */
21 else
22 return __kernel_standard (x, x, 249); /* log2l (x < 0) */
24 else
25 return z;
26 #endif
28 weak_alias (__log2l, log2l)