z_exp.c 357 B

1234567891011121314151617181920212223
  1. #include "f2c.h"
  2. #ifdef KR_headers
  3. double exp(), cos(), sin();
  4. VOID z_exp(r, z) doublecomplex *r, *z;
  5. #else
  6. #undef abs
  7. #include "math.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. void z_exp(doublecomplex *r, doublecomplex *z)
  12. #endif
  13. {
  14. double expx, zi = z->i;
  15. expx = exp(z->r);
  16. r->r = expx * cos(zi);
  17. r->i = expx * sin(zi);
  18. }
  19. #ifdef __cplusplus
  20. }
  21. #endif