summaryrefslogtreecommitdiffstats
path: root/contrib/libf2c/libF77/z_log.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-09-18 10:51:31 +0000
committerobrien <obrien@FreeBSD.org>1999-09-18 10:51:31 +0000
commit399f9861eec03313255de3a17067f04571882b52 (patch)
treefd7346fa6c94b84f42f84309dc32a7a323037d0d /contrib/libf2c/libF77/z_log.c
parent4edb29d7da1bb78e68bae7b1f7403d913b2a38cc (diff)
parent98e51635e2084da6cfe0d3b1782cb95b80fd2caa (diff)
downloadFreeBSD-src-399f9861eec03313255de3a17067f04571882b52.zip
FreeBSD-src-399f9861eec03313255de3a17067f04571882b52.tar.gz
This commit was generated by cvs2svn to compensate for changes in r51363,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/libf2c/libF77/z_log.c')
-rw-r--r--contrib/libf2c/libF77/z_log.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/libf2c/libF77/z_log.c b/contrib/libf2c/libF77/z_log.c
new file mode 100644
index 0000000..48afca6
--- /dev/null
+++ b/contrib/libf2c/libF77/z_log.c
@@ -0,0 +1,20 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+double log(), f__cabs(), atan2();
+VOID z_log(resx, z) doublecomplex *resx, *z;
+#else
+#undef abs
+#include <math.h>
+extern double f__cabs(double, double);
+void z_log(doublecomplex *resx, doublecomplex *z)
+#endif
+{
+doublecomplex res;
+
+res.i = atan2(z->i, z->r);
+res.r = log( f__cabs( z->r, z->i ) );
+
+resx->r = res.r;
+resx->i = res.i;
+}
OpenPOWER on IntegriCloud