Back to index

glibc  2.9
w_log2l.c
Go to the documentation of this file.
00001 /*
00002  * wrapper log2l(X)
00003  */
00004 
00005 #include <math.h>
00006 #include "math_private.h"
00007 
00008 long double
00009 __log2l (long double x)     /* wrapper log2l */
00010 {
00011 #ifdef _IEEE_LIBM
00012   return __ieee754_log2l (x);
00013 #else
00014   long double z;
00015   z = __ieee754_log2l (x);
00016   if (_LIB_VERSION == _IEEE_ || __isnanl (x)) return z;
00017   if (x <= 0.0)
00018     {
00019       if (x == 0.0)
00020        return __kernel_standard (x, x, 248); /* log2l (0) */
00021       else
00022        return __kernel_standard (x, x, 249); /* log2l (x < 0) */
00023     }
00024   else
00025     return z;
00026 #endif
00027 }
00028 weak_alias (__log2l, log2l)