]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/generic/w_log2f.c
Test for stack alignment.
[thirdparty/glibc.git] / sysdeps / generic / w_log2f.c
CommitLineData
601d2942
UD
1/*
2 * wrapper log2(X)
3 */
4
5#include "math.h"
6#include "math_private.h"
7
8float
9__log2f (float x) /* wrapper log2f */
10{
11#ifdef _IEEE_LIBM
12 return __ieee754_log2f (x);
13#else
14 float z;
15 z = __ieee754_log2f (x);
16 if (_LIB_VERSION == _IEEE_ || __isnanf (x)) return z;
17 if (x <= 0.0f)
18 {
19 if (x == 0.0f)
20 /* log2f (0) */
21 return __kernel_standard ((double) x, (double) x, 148);
22 else
23 /* log2f (x < 0) */
24 return __kernel_standard ((double) x, (double) x, 149);
25 }
26 else
27 return z;
28#endif
29}
30weak_alias (__log2f, log2f)