summaryrefslogtreecommitdiffstats
path: root/lib/libF77/c_cos.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libF77/c_cos.c')
-rw-r--r--lib/libF77/c_cos.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/libF77/c_cos.c b/lib/libF77/c_cos.c
new file mode 100644
index 0000000..4aea0c3
--- /dev/null
+++ b/lib/libF77/c_cos.c
@@ -0,0 +1,17 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+extern double sin(), cos(), sinh(), cosh();
+
+VOID c_cos(r, z) complex *r, *z;
+#else
+#undef abs
+#include "math.h"
+
+void c_cos(complex *r, complex *z)
+#endif
+{
+ double zr = z->r;
+ r->r = cos(zr) * cosh(z->i);
+ r->i = - sin(zr) * sinh(z->i);
+ }
OpenPOWER on IntegriCloud