Back to index

glibc  2.9
Functions
s_ccosf.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__ float __ccosf (__complex__ float x)

Function Documentation

__complex__ float __ccosf ( __complex__ float  x)

Definition at line 27 of file s_ccosf.c.

{
  __complex__ float res;

  if (!isfinite (__real__ x) || __isnanf (__imag__ x))
    {
      if (__real__ x == 0.0 || __imag__ x == 0.0)
       {
         __real__ res = __nanf ("");
         __imag__ res = 0.0;

#ifdef FE_INVALID
         if (__isinff (__real__ x))
           feraiseexcept (FE_INVALID);
#endif
       }
      else if (__isinff (__imag__ x))
       {
         __real__ res = HUGE_VALF;
         __imag__ res = __nanf ("");

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

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

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

      res = __ccoshf (y);
    }

  return res;
}

Here is the call graph for this function: