Back to index

glibc  2.9
Defines | Functions
s_csin.c File Reference
#include <complex.h>
#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)


__complex__ float_type s() __csin (__complex__ float_type x)

Define Documentation

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

Definition at line 32 of file s_csin.c.

#define float_type   double

Definition at line 29 of file s_csin.c.

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

Definition at line 34 of file s_csin.c.

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

Definition at line 33 of file s_csin.c.

#define SUFF

Definition at line 26 of file s_csin.c.

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

Definition at line 68 of file s_csin.c.

Function Documentation

__complex__ float_type s() __csin ( __complex__ float_type  x)

Definition at line 37 of file s_csin.c.

  __complex__ float_type retval;
  unsigned long rx_cond = __m81_test (__real__ x);

  if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
      /* Real part is finite.  */
      float_type sin_rx, cos_rx;

      __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx)
            : "f" (__real__ x));
      if (rx_cond & __M81_COND_ZERO)
       __real__ retval = __real__ x;
       __real__ retval = sin_rx * m81(__ieee754_cosh) (__imag__ x);
      __imag__ retval = cos_rx * m81(__ieee754_sinh) (__imag__ x);
      unsigned long ix_cond = __m81_test (__imag__ x);

      __real__ retval = __real__ x - __real__ x;
      if (ix_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN))
       __imag__ retval = __imag__ x;
       __imag__ retval = __real__ retval;

  return retval;

Here is the call graph for this function: