Back to index

glibc  2.9
Functions
w_log2f.c File Reference
#include <math.h>
#include "math_private.h"

Go to the source code of this file.

Functions

float __log2f (float x)

Function Documentation

float __log2f ( float  x)

Definition at line 9 of file w_log2f.c.

{
#ifdef _IEEE_LIBM
  return __ieee754_log2f (x);
#else
  float z;
  z = __ieee754_log2f (x);
  if (_LIB_VERSION == _IEEE_ || __isnanf (x)) return z;
  if (x <= 0.0f)
    {
      if (x == 0.0f)
       /* log2f (0) */
       return __kernel_standard ((double) x, (double) x, 148);
      else
       /* log2f (x < 0) */
       return __kernel_standard ((double) x, (double) x, 149);
    }
  else
    return z;
#endif
}

Here is the call graph for this function: