diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /lib/libF77/c_log.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Diffstat (limited to 'lib/libF77/c_log.c')
| -rw-r--r-- | lib/libF77/c_log.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libF77/c_log.c b/lib/libF77/c_log.c new file mode 100644 index 000000000000..a77521aee548 --- /dev/null +++ b/lib/libF77/c_log.c @@ -0,0 +1,16 @@ +#include "f2c.h" + +#ifdef KR_headers +extern double log(), f__cabs(), atan2(); +VOID c_log(r, z) complex *r, *z; +#else +#undef abs +#include "math.h" +extern double f__cabs(double, double); + +void c_log(complex *r, complex *z) +#endif +{ +r->i = atan2(z->i, z->r); +r->r = log( f__cabs(z->r, z->i) ); +} |
