Back to index

glibc  2.9
Functions
s_ccosl.c File Reference
#include <complex.h>
#include <fenv.h>
#include <math.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

__complex__ long double __ccosl (__complex__ long double x)

Function Documentation

__complex__ long double __ccosl ( __complex__ long double  x)

Definition at line 27 of file s_ccosl.c.

{
  __complex__ long double res;

  if (!isfinite (__real__ x) || __isnanl (__imag__ x))
    {
      if (__real__ x == 0.0 || __imag__ x == 0.0)
       {
         __real__ res = __nanl ("");
         __imag__ res = 0.0;

#ifdef FE_INVALID
         if (__isinfl (__real__ x))
           feraiseexcept (FE_INVALID);
#endif
       }
      else if (__isinfl (__imag__ x))
       {
         __real__ res = HUGE_VALL;
         __imag__ res = __nanl ("");

#ifdef FE_INVALID
         if (__isinfl (__real__ x))
           feraiseexcept (FE_INVALID);
#endif
       }
      else
       {
         __real__ res = __nanl ("");
         __imag__ res = __nanl ("");

#ifdef FE_INVALID
         if (isfinite (__imag__ x))
           feraiseexcept (FE_INVALID);
#endif
       }
    }
  else
    {
      __complex__ long double y;

      __real__ y = -__imag__ x;
      __imag__ y = __real__ x;

      res = __ccoshl (y);
    }

  return res;
}

Here is the call graph for this function: