Debian Codegraph @

debian/external_deps/fetk/punc/src/vf2c/c_log.c

raw
1 #include "f2c.h"
2
3 #ifdef KR_headers
4 extern double log(), f__cabs(), atan2();
5 VOID c_log(r, z) realcomplex *r, *z;
6 #else
7 #undef abs
8 #include "math.h"
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 extern double f__cabs(double, double);
13
14 void c_log(realcomplex *r, realcomplex *z)
15 #endif
16 {
17 double zi, zr;
18 r->i = atan2(zi = z->i, zr = z->r);
19 r->r = log( f__cabs(zr, zi) );
20 }
21 #ifdef __cplusplus
22 }
23 #endif