z_sin.c 359 B

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