Lines Matching full:z

62 static double complex clog_for_large_values(double complex z);
90 * Throughout we use the convention z = x + I*y.
92 * casinh(z) = sign(x)*log(A+sqrt(A*A-1)) + I*asin(B)
94 * A = (|z+I| + |z-I|) / 2
95 * B = (|z+I| - |z-I|) / 2 = y/A
98 * (a) for Re(casinh(z)) when z is close to the line segment [-I, I] (that
99 * is, Re(casinh(z)) is close to 0);
100 * (b) for Im(casinh(z)) when z is close to either of the intervals
101 * [I, I*infinity) or (-I*infinity, -I] (that is, |Im(casinh(z))| is
145 * rx = Re(casinh(z)) = -Im(cacos(y + I*x)).
158 R = hypot(x, y + 1); /* |z+I| */ in do_hard_work()
159 S = hypot(x, y - 1); /* |z-I| */ in do_hard_work()
161 /* A = (|z+I| + |z-I|) / 2 */ in do_hard_work()
219 /* B = (|z+I| - |z-I|) / 2 = y/A */ in do_hard_work()
266 * casinh(z) = z + O(z^3) as z -> 0
268 * casinh(z) = sign(x)*clog(sign(x)*z) + O(1/z^2) as z -> infinity
270 * Im(casinh(z)) = sign(x)*atan2(sign(x)*y, fabs(x)) + O(y/z^3)
271 * as z -> infinity, uniformly in y
274 casinh(double complex z) in casinh() argument
280 x = creal(z); in casinh()
281 y = cimag(z); in casinh()
306 w = clog_for_large_values(z) + m_ln2; in casinh()
308 w = clog_for_large_values(-z) + m_ln2; in casinh()
312 /* Avoid spuriously raising inexact for z = 0. */ in casinh()
314 return (z); in casinh()
320 return (z); in casinh()
331 * casin(z) = reverse(casinh(reverse(z)))
332 * where reverse(x + I*y) = y + I*x = I*conj(z).
335 casin(double complex z) in casin() argument
337 double complex w = casinh(CMPLX(cimag(z), creal(z))); in casin()
343 * cacos(z) = PI/2 - casin(z)
344 * but do the computation carefully so cacos(z) is accurate when z is
347 * cacos(z) = PI/2 - z + O(z^3) as z -> 0
349 * cacos(z) = -sign(y)*I*clog(z) + O(1/z^2) as z -> infinity
351 * Re(cacos(z)) = atan2(fabs(y), x) + O(y/z^3)
352 * as z -> infinity, uniformly in y
355 cacos(double complex z) in cacos() argument
362 x = creal(z); in cacos()
363 y = cimag(z); in cacos()
389 w = clog_for_large_values(z); in cacos()
397 /* Avoid spuriously raising inexact for z = 1. */ in cacos()
425 * cacosh(z) = I*cacos(z) or -I*cacos(z)
426 * where the sign is chosen so Re(cacosh(z)) >= 0.
429 cacosh(double complex z) in cacosh() argument
434 w = cacos(z); in cacosh()
447 return (CMPLX(fabs(ry), copysign(rx, cimag(z)))); in cacosh()
451 * Optimized version of clog() for |z| finite and larger than ~RECIP_EPSILON.
454 clog_for_large_values(double complex z) in clog_for_large_values() argument
459 x = creal(z); in clog_for_large_values()
460 y = cimag(z); in clog_for_large_values()
522 * the code creal(1/z), because the imaginary part may produce an unwanted
559 * catanh(z) = log((1+z)/(1-z)) / 2
560 * = log1p(4*x / |z-1|^2) / 4
563 * catanh(z) = z + O(z^3) as z -> 0
565 * catanh(z) = 1/z + sign(y)*I*PI/2 + O(1/z^3) as z -> infinity
567 * Re(catanh(z)) = x/|z|^2 + O(x/z^4)
568 * as z -> infinity, uniformly in x
571 catanh(double complex z) in catanh() argument
575 x = creal(z); in catanh()
576 y = cimag(z); in catanh()
584 /* To ensure the same accuracy as atan(), and to filter out z = 0. */ in catanh()
610 * z = 0 was filtered out above. All other cases must raise in catanh()
615 return (z); in catanh()
634 * catan(z) = reverse(catanh(reverse(z)))
635 * where reverse(x + I*y) = y + I*x = I*conj(z).
638 catan(double complex z) in catan() argument
640 double complex w = catanh(CMPLX(cimag(z), creal(z))); in catan()