Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cprojf.c « complex « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f1d2d730a8e05f2b43cc1c76690a85aed6a2482c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
   cprojf.c
   Contributed by Danny Smith
   2004-12-24
*/

#include <math.h>
#include <complex.h>

/* Return the value of the projection onto the Riemann sphere.*/

float complex cprojf (float complex Z)
{
  complex float Res = Z;
  if (isinf (__real__ Z) || isinf (__imag__ Z))
    {
      __real__ Res = HUGE_VALF;
      __imag__ Res = copysignf (0.0f, __imag__ Z);
    }
  return Res;
}