aboutsummaryrefslogtreecommitdiff
path: root/libf2c/libF77/z_sin.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-01-31 18:37:08 -0700
committerJeff Law <law@gcc.gnu.org>1998-01-31 18:37:08 -0700
commit81fea2b1d147752f431b46c08f4c12a18a2d78bc (patch)
tree4b30cdf598ee6a8b24903fba52bb3e0c06bf459b /libf2c/libF77/z_sin.c
parent0dfb6849ef1d4c8b5bf178d7add69ab297fab8fa (diff)
downloadgcc-81fea2b1d147752f431b46c08f4c12a18a2d78bc.zip
gcc-81fea2b1d147752f431b46c08f4c12a18a2d78bc.tar.gz
gcc-81fea2b1d147752f431b46c08f4c12a18a2d78bc.tar.bz2
* Previous contents of gcc/f/runtime moved into toplevel
"libf2c" directory. From-SVN: r17568
Diffstat (limited to 'libf2c/libF77/z_sin.c')
-rw-r--r--libf2c/libF77/z_sin.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libf2c/libF77/z_sin.c b/libf2c/libF77/z_sin.c
new file mode 100644
index 0000000..94456c9
--- /dev/null
+++ b/libf2c/libF77/z_sin.c
@@ -0,0 +1,19 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+double sin(), cos(), sinh(), cosh();
+VOID z_sin(resx, z) doublecomplex *resx, *z;
+#else
+#undef abs
+#include <math.h>
+void z_sin(doublecomplex *resx, doublecomplex *z)
+#endif
+{
+doublecomplex res;
+
+res.r = sin(z->r) * cosh(z->i);
+res.i = cos(z->r) * sinh(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}