Lines Matching +full:y +full:-

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
30 * Hyperbolic tangent of a complex argument z = x + I y.
41 * beta = 1/cos^2(y)
49 * sinh(x) cos(y) + I cosh(x) sin(y)
50 * = ---------------------------------
51 * cosh(x) cos(y) + I sinh(x) sin(y)
53 * cosh(x) sinh(x) / cos^2(y) + I tan(y)
54 * = -------------------------------------
55 * 1 + sinh^2(x) / cos^2(y)
58 * = ----------------
76 double x, y; in ctanh() local
81 y = cimag(z); in ctanh()
87 * ctanh(NaN +- I 0) = d(NaN) +- I 0 in ctanh()
89 * ctanh(NaN + I y) = d(NaN,y) + I d(NaN,y) for y != 0 in ctanh()
91 * The imaginary part has the sign of x*sin(2*y), but there's no in ctanh()
94 * ctanh(+-Inf +- I Inf) = +-1 +- I 0 in ctanh()
96 * ctanh(+-Inf + I y) = +-1 + I 0 sin(2y) for y finite in ctanh()
100 * y is infinite. in ctanh()
104 return (CMPLX(nan_mix(x, y), in ctanh()
105 y == 0 ? y : nan_mix(x, y))); in ctanh()
106 SET_HIGH_WORD(x, hx - 0x40000000); /* x = copysign(1, x) */ in ctanh()
107 return (CMPLX(x, copysign(0, isinf(y) ? y : sin(y) * cos(y)))); in ctanh()
111 * ctanh(+-0 + i NAN) = +-0 + i NaN in ctanh()
112 * ctanh(+-0 +- i Inf) = +-0 + i NaN in ctanh()
114 * ctanh(x +- i Inf) = NaN + i NaN in ctanh()
116 if (!isfinite(y)) in ctanh()
117 return (CMPLX(x ? y - y : x, y - y)); in ctanh()
120 * ctanh(+-huge +- I y) ~= +-1 +- I 2sin(2y)/exp(2x), using the in ctanh()
125 double exp_mx = exp(-fabs(x)); in ctanh()
127 4 * sin(y) * cos(y) * exp_mx * exp_mx)); in ctanh()
131 t = tan(y); in ctanh()
132 beta = 1.0 + t * t; /* = 1 / cos^2(y) */ in ctanh()
143 /* ctan(z) = -I * ctanh(I * z) = I * conj(ctanh(I * conj(z))) */ in ctan()