From: kargl Date: Fri, 10 Jul 2009 15:25:31 +0000 (+0000) Subject: 2009-07-10 Steven G. Kargl X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=dda29e0198ccf61b92162d392ce4387f18fc4906 2009-07-10 Steven G. Kargl * c99_functions.c (ccoshf, ccosh, ccoshl, ctanhf, ctanh, ctanl): Fix errant minus. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149479 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 7ea4129aed2..6ffd83d40ec 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2009-07-10 Steven G. Kargl + + * c99_functions.c (ccoshf, ccosh, ccoshl, ctanhf, ctanh, ctanl): + Fix errant minus. + 2009-07-08 Jerry DeLisle PR libfortran/40330 diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c index d4ed17fc1b0..63af2a51f3a 100644 --- a/libgfortran/intrinsics/c99_functions.c +++ b/libgfortran/intrinsics/c99_functions.c @@ -1165,7 +1165,7 @@ csinhl (long double complex a) #endif -/* cosh(a + i b) = cosh(a) cos(b) - i sinh(a) sin(b) */ +/* cosh(a + i b) = cosh(a) cos(b) + i sinh(a) sin(b) */ #if !defined(HAVE_CCOSHF) #define HAVE_CCOSHF 1 float complex @@ -1176,7 +1176,7 @@ ccoshf (float complex a) r = REALPART (a); i = IMAGPART (a); - COMPLEX_ASSIGN (v, coshf (r) * cosf (i), - (sinhf (r) * sinf (i))); + COMPLEX_ASSIGN (v, coshf (r) * cosf (i), sinhf (r) * sinf (i)); return v; } #endif @@ -1191,7 +1191,7 @@ ccosh (double complex a) r = REALPART (a); i = IMAGPART (a); - COMPLEX_ASSIGN (v, cosh (r) * cos (i), - (sinh (r) * sin (i))); + COMPLEX_ASSIGN (v, cosh (r) * cos (i), sinh (r) * sin (i)); return v; } #endif @@ -1206,13 +1206,13 @@ ccoshl (long double complex a) r = REALPART (a); i = IMAGPART (a); - COMPLEX_ASSIGN (v, coshl (r) * cosl (i), - (sinhl (r) * sinl (i))); + COMPLEX_ASSIGN (v, coshl (r) * cosl (i), sinhl (r) * sinl (i)); return v; } #endif -/* tanh(a + i b) = (tanh(a) + i tan(b)) / (1 - i tanh(a) tan(b)) */ +/* tanh(a + i b) = (tanh(a) + i tan(b)) / (1 + i tanh(a) tan(b)) */ #if !defined(HAVE_CTANHF) #define HAVE_CTANHF 1 float complex @@ -1224,7 +1224,7 @@ ctanhf (float complex a) rt = tanhf (REALPART (a)); it = tanf (IMAGPART (a)); COMPLEX_ASSIGN (n, rt, it); - COMPLEX_ASSIGN (d, 1, - (rt * it)); + COMPLEX_ASSIGN (d, 1, rt * it); return n / d; } @@ -1241,7 +1241,7 @@ ctanh (double complex a) rt = tanh (REALPART (a)); it = tan (IMAGPART (a)); COMPLEX_ASSIGN (n, rt, it); - COMPLEX_ASSIGN (d, 1, - (rt * it)); + COMPLEX_ASSIGN (d, 1, rt * it); return n / d; } @@ -1258,7 +1258,7 @@ ctanhl (long double complex a) rt = tanhl (REALPART (a)); it = tanl (IMAGPART (a)); COMPLEX_ASSIGN (n, rt, it); - COMPLEX_ASSIGN (d, 1, - (rt * it)); + COMPLEX_ASSIGN (d, 1, rt * it); return n / d; }