summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/f/runtime/libF77/c_exp.c
blob: 8d3d33d0fe356cf271879ebba9ed849a3dd703ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "f2c.h"

#ifdef KR_headers
extern double exp(), cos(), sin();

 VOID c_exp(resx, z) complex *resx, *z;
#else
#undef abs
#include <math.h>

void c_exp(complex *resx, complex *z)
#endif
{
double expx;
complex res;

expx = exp(z->r);
res.r = expx * cos(z->i);
res.i = expx * sin(z->i);

resx->r = res.r;
resx->i = res.i;
}