summaryrefslogtreecommitdiff
path: root/libf2c/libF77/c_log.c
diff options
context:
space:
mode:
authorburley <burley@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-03 08:33:21 +0000
committerburley <burley@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-03 08:33:21 +0000
commitfb206187b4d24988a1d9efa2b1938f09106e1f50 (patch)
tree45ef91b9ac4f48ed52f259bf5ef40196e9479ead /libf2c/libF77/c_log.c
parent502f3e6fec715527e92332d89fc42ade1f39fae5 (diff)
downloadgcc-fb206187b4d24988a1d9efa2b1938f09106e1f50.tar.gz
revert back to netlib versions as of f2c-19990501
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26739 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c/libF77/c_log.c')
-rw-r--r--libf2c/libF77/c_log.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/libf2c/libF77/c_log.c b/libf2c/libF77/c_log.c
index 6715131ad1d..6ac990ca267 100644
--- a/libf2c/libF77/c_log.c
+++ b/libf2c/libF77/c_log.c
@@ -2,20 +2,16 @@
#ifdef KR_headers
extern double log(), f__cabs(), atan2();
-VOID c_log(resx, z) complex *resx, *z;
+VOID c_log(r, z) complex *r, *z;
#else
#undef abs
-#include <math.h>
+#include "math.h"
extern double f__cabs(double, double);
-void c_log(complex *resx, complex *z)
+void c_log(complex *r, complex *z)
#endif
{
-complex 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;
-}
+ double zi;
+ r->i = atan2(zi = z->i, z->r);
+ r->r = log( f__cabs(z->r, zi) );
+ }