z_cos.c 363 B

123456789101112131415161718192021
  1. #include "f2c.h"
  2. #ifdef KR_headers
  3. double sin(), cos(), sinh(), cosh();
  4. VOID z_cos(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_cos(doublecomplex *r, doublecomplex *z)
  12. #endif
  13. {
  14. double zi = z->i, zr = z->r;
  15. r->r = cos(zr) * cosh(zi);
  16. r->i = - sin(zr) * sinh(zi);
  17. }
  18. #ifdef __cplusplus
  19. }
  20. #endif