Back to index

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

Go to the source code of this file.


__complex__ long double __cprojl (__complex__ long double x)

Function Documentation

__complex__ long double __cprojl ( __complex__ long double  x)

Definition at line 26 of file s_cprojl.c.

  __complex__ long double res;

  if (isnan (__real__ x) && isnan (__imag__ x))
    return x;
  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
      __real__ res = INFINITY;
      __imag__ res = __copysignl (0.0, __imag__ x);
      long double den = (__real__ x * __real__ x + __imag__ x * __imag__ x
                      + 1.0);

      __real__ res = (2.0 * __real__ x) / den;
      __imag__ res = (2.0 * __imag__ x) / den;

  return res;

Here is the call graph for this function: