+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
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)) */
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)) */
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)) */