c_cos.c 354 B

1234567891011121314151617181920212223
  1. #include "f2c.h"
  2. #ifdef KR_headers
  3. extern double sin(), cos(), sinh(), cosh();
  4. VOID c_cos(r, z) complex *r, *z;
  5. #else
  6. #undef abs
  7. #include "math.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. void c_cos(complex *r, complex *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