1 #include "f2c.h" 2 3 #ifdef KR_headers 4 extern double sin(), cos(), sinh(), cosh(); 5 c_cos(r,z)6VOID c_cos(r, z) complex *r, *z; 7 #else 8 #undef abs 9 #include "math.h" 10 #ifdef complex /* [BL] MSVC defines a complex macro that collides with f2c's complex */ 11 #undef complex 12 #endif 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 void c_cos(complex *r, complex *z) 19 #endif 20 { 21 double zi = z->i, zr = z->r; 22 r->r = cos(zr) * cosh(zi); 23 r->i = - sin(zr) * sinh(zi); 24 } 25 #ifdef __cplusplus 26 } 27 #endif 28