debian/external_deps/fetk/punc/src/vf2c/c_exp.c
raw| 1 | #include "f2c.h" |
| 2 | |
| 3 | #ifdef KR_headers |
| 4 | extern double exp(), cos(), sin(); |
| 5 | |
| 6 | VOID c_exp(r, z) realcomplex *r, *z; |
| 7 | #else |
| 8 | #undef abs |
| 9 | #include "math.h" |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | void c_exp(realcomplex *r, realcomplex *z) |
| 15 | #endif |
| 16 | { |
| 17 | double expx, zi = z->i; |
| 18 | |
| 19 | expx = exp(z->r); |
| 20 | r->r = expx * cos(zi); |
| 21 | r->i = expx * sin(zi); |
| 22 | } |
| 23 | #ifdef __cplusplus |
| 24 | } |
| 25 | #endif |