summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-11 16:05:08 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-11 16:05:08 +0000
commit9af8256d49b5641d5b5624c248543912ff404ef8 (patch)
tree144a61914c89a3020dfa232c9d49f8345b752d4f /libgfortran
parentdcb0b57848773251e82fdb470ea4b623d70da22c (diff)
downloadgcc-9af8256d49b5641d5b5624c248543912ff404ef8.tar.gz
PR fortran/16303
* m4/cexp.m4 (carg): Return -pi to pi. * generated/exp_c?.c: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/generated/exp_c4.c9
-rw-r--r--libgfortran/generated/exp_c8.c9
-rw-r--r--libgfortran/m4/cexp.m49
4 files changed, 15 insertions, 18 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 8458be34da2..eb4b29c6866 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-11 Paul Brook <paul@codesourcery.com>
+
+ PR fortran/16303
+ * m4/cexp.m4 (carg): Return -pi to pi.
+ * generated/exp_c?.c: Regenerate.
+
2004-07-08 Andreas Krebbel <krebbel1@de.ibm.com>
PR fortran/16291
diff --git a/libgfortran/generated/exp_c4.c b/libgfortran/generated/exp_c4.c
index d95213446ee..06e0103e3d8 100644
--- a/libgfortran/generated/exp_c4.c
+++ b/libgfortran/generated/exp_c4.c
@@ -30,17 +30,14 @@ cabsf (GFC_COMPLEX_4 z)
return hypotf (REALPART (z), IMAGPART (z));
}
-/* Complex argument. The angle made with the +ve real axis. Range 0-2pi. */
+/* Complex argument. The angle made with the +ve real axis.
+ Range -pi-pi. */
GFC_REAL_4
cargf (GFC_COMPLEX_4 z)
{
GFC_REAL_4 arg;
- arg = atan2f (IMAGPART (z), REALPART (z));
- if (arg < 0)
- return arg + 2 * M_PI;
- else
- return arg;
+ return atan2f (IMAGPART (z), REALPART (z));
}
/* exp(z) = exp(a)*(cos(b) + isin(b)) */
diff --git a/libgfortran/generated/exp_c8.c b/libgfortran/generated/exp_c8.c
index 74cbbdc5145..5bd96495b96 100644
--- a/libgfortran/generated/exp_c8.c
+++ b/libgfortran/generated/exp_c8.c
@@ -30,17 +30,14 @@ cabs (GFC_COMPLEX_8 z)
return hypot (REALPART (z), IMAGPART (z));
}
-/* Complex argument. The angle made with the +ve real axis. Range 0-2pi. */
+/* Complex argument. The angle made with the +ve real axis.
+ Range -pi-pi. */
GFC_REAL_8
carg (GFC_COMPLEX_8 z)
{
GFC_REAL_8 arg;
- arg = atan2 (IMAGPART (z), REALPART (z));
- if (arg < 0)
- return arg + 2 * M_PI;
- else
- return arg;
+ return atan2 (IMAGPART (z), REALPART (z));
}
/* exp(z) = exp(a)*(cos(b) + isin(b)) */
diff --git a/libgfortran/m4/cexp.m4 b/libgfortran/m4/cexp.m4
index 1d22b089a92..c91945051e3 100644
--- a/libgfortran/m4/cexp.m4
+++ b/libgfortran/m4/cexp.m4
@@ -31,17 +31,14 @@ cabs`'q (complex_type z)
return hypot`'q (REALPART (z), IMAGPART (z));
}
-/* Complex argument. The angle made with the +ve real axis. Range 0-2pi. */
+/* Complex argument. The angle made with the +ve real axis.
+ Range -pi-pi. */
real_type
carg`'q (complex_type z)
{
real_type arg;
- arg = atan2`'q (IMAGPART (z), REALPART (z));
- if (arg < 0)
- return arg + 2 * M_PI;
- else
- return arg;
+ return atan2`'q (IMAGPART (z), REALPART (z));
}
/* exp(z) = exp(a)*(cos(b) + isin(b)) */