diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-13 21:13:26 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-13 21:13:26 +0000 |
commit | 0b70138e48fbac22d94294e3ad1d6479e61d3d95 (patch) | |
tree | 600f6513b5b8125a1934c211f7d73c247ffaa9ac /comms/nec2c/files/carg.c | |
parent | 0e9dd205c926bbd5b5093da7b0fd8356e7c44a60 (diff) |
nec2c is a translation of the NEC2 FORTRAN source code to the C language.
The translation was performed mostly "by hand" and a lot of modifications
to the original program were introduced in order to modernize the NEC2
and to remove as many built-in limitations as possible. The attendant
SOMNEC program was also translated to C and incorporated in nec2c as a
function so that Sommerfeld ground solutions are a part of the program.
PR: ports/83392
Submitted by: Diane Bruce <db@db.net>
Notes
Notes:
svn path=/head/; revision=139134
Diffstat (limited to 'comms/nec2c/files/carg.c')
-rw-r--r-- | comms/nec2c/files/carg.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/comms/nec2c/files/carg.c b/comms/nec2c/files/carg.c new file mode 100644 index 000000000000..0e021032c0dd --- /dev/null +++ b/comms/nec2c/files/carg.c @@ -0,0 +1,20 @@ +/* carg.f -- translated by f2c (version 20000817). +*/ +#include <math.h> +#include <complex.h> + +double carg(complex z__) +{ + /* System generated locals */ + double ret_val; + +/* april 1977 version. w. fullerton, c3, los alamos scientific lab. */ + + ret_val = (float)0.; + if (creal(z__) != (float)0. || cimag(z__) != (float)0.) { + ret_val = atan2(cimag(z__), creal(z__)); + } + + return ret_val; +} /* carg */ + |