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

#ifdef KR_headers
double sin(), cos(), sinh(), cosh();
VOID z_sin(resx, z) doublecomplex *resx, *z;
#else
#undef abs
#include <math.h>
void z_sin(doublecomplex *resx, doublecomplex *z)
#endif
{
doublecomplex res;

res.r = sin(z->r) * cosh(z->i);
res.i = cos(z->r) * sinh(z->i);

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