Initial revision
[official-gcc.git] / gcc / f / runtime / libF77 / z_exp.c
blob85fb63e42095d984d8e2e677b81b49f3874e3b67
1 #include "f2c.h"
3 #ifdef KR_headers
4 double exp(), cos(), sin();
5 VOID z_exp(resx, z) doublecomplex *resx, *z;
6 #else
7 #undef abs
8 #include <math.h>
9 void z_exp(doublecomplex *resx, doublecomplex *z)
10 #endif
12 double expx;
13 doublecomplex res;
15 expx = exp(z->r);
16 res.r = expx * cos(z->i);
17 res.i = expx * sin(z->i);
19 resx->r = res.r;
20 resx->i = res.i;