Back to index

glibc  2.9
Defines | Functions
s_modf.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)


float_type s() __modf (float_type x, float_type *iptr)

Define Documentation

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

Definition at line 29 of file s_modf.c.

#define float_type   double

Definition at line 26 of file s_modf.c.

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

Definition at line 31 of file s_modf.c.

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

Definition at line 30 of file s_modf.c.

#define SUFF

Definition at line 23 of file s_modf.c.

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

Definition at line 55 of file s_modf.c.

Function Documentation

float_type s() __modf ( float_type  x,
float_type iptr 

Definition at line 34 of file s_modf.c.

  float_type x_int, result;
  unsigned long x_cond;

  __asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x));
  *iptr = x_int;
  x_cond = __m81_test (x);
  if (x_cond & __M81_COND_INF)
      result = 0;
      if (x_cond & __M81_COND_NEG)
       result = -result;
  else if (x_cond & __M81_COND_ZERO)
    result = x;
    result = x - x_int;
  return result;

Here is the call graph for this function: