Back to index

glibc  2.9
Defines | Functions
s_ilogb.c File Reference
#include <math.h>
#include "mathimpl.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define SUFF
#define float_type   double
#define CONCATX(a, b)   __CONCAT(a,b)
#define s(name)   CONCATX(name,SUFF)
#define m81(func)   __m81_u(s(func))
#define weak_aliasx(a, b)   weak_alias(a,b)


int s() __ilogb (float_type x)

Define Documentation

#define CONCATX (   a,
)    __CONCAT(a,b)

Definition at line 29 of file s_ilogb.c.

#define float_type   double

Definition at line 26 of file s_ilogb.c.

#define m81 (   func)    __m81_u(s(func))

Definition at line 31 of file s_ilogb.c.

#define s (   name)    CONCATX(name,SUFF)

Definition at line 30 of file s_ilogb.c.

#define SUFF

Definition at line 23 of file s_ilogb.c.

#define weak_aliasx (   a,
)    weak_alias(a,b)

Definition at line 50 of file s_ilogb.c.

Function Documentation

int s() __ilogb ( float_type  x)

Definition at line 34 of file s_ilogb.c.

  float_type result;
  unsigned long x_cond;

  x_cond = __m81_test (x);
  /* We must return consistent values for zero and NaN.  */
  if (x_cond & __M81_COND_ZERO)
    return FP_ILOGB0;
  if (x_cond & (__M81_COND_NAN | __M81_COND_INF))
    return FP_ILOGBNAN;

  __asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x));
  return (int) result;

Here is the call graph for this function:

Here is the caller graph for this function: