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

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

/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */

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

long double complex clogl (long double complex Z)
{
  long double complex Res;
  __real__ Res = logl (hypotl (__real__ Z,  __imag__ Z));
  __imag__ Res = cargl (Z);
  return Res;
}