repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial revision
[official-gcc.git]
/
gcc
/
f
/
runtime
/
libF77
/
z_exp.c
blob
85fb63e42095d984d8e2e677b81b49f3874e3b67
1
#include
"f2c.h"
2
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
11
{
12
double
expx
;
13
doublecomplex res
;
14
15
expx
=
exp
(
z
->
r
);
16
res
.
r
=
expx
*
cos
(
z
->
i
);
17
res
.
i
=
expx
*
sin
(
z
->
i
);
18
19
resx
->
r
=
res
.
r
;
20
resx
->
i
=
res
.
i
;
21
}