#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
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
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
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
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;
}
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;
}
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;
}