summaryrefslogtreecommitdiff
path: root/src/complex/ccosh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/ccosh.c')
-rw-r--r--src/complex/ccosh.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/complex/ccosh.c b/src/complex/ccosh.c
index 81f29432..401f3c60 100644
--- a/src/complex/ccosh.c
+++ b/src/complex/ccosh.c
@@ -55,23 +55,23 @@ double complex ccosh(double complex z)
/* Handle the nearly-non-exceptional cases where x and y are finite. */
if (ix < 0x7ff00000 && iy < 0x7ff00000) {
if ((iy | ly) == 0)
- return cpack(cosh(x), x * y);
+ return CMPLX(cosh(x), x * y);
if (ix < 0x40360000) /* small x: normal case */
- return cpack(cosh(x) * cos(y), sinh(x) * sin(y));
+ return CMPLX(cosh(x) * cos(y), sinh(x) * sin(y));
/* |x| >= 22, so cosh(x) ~= exp(|x|) */
if (ix < 0x40862e42) {
/* x < 710: exp(|x|) won't overflow */
h = exp(fabs(x)) * 0.5;
- return cpack(h * cos(y), copysign(h, x) * sin(y));
+ return CMPLX(h * cos(y), copysign(h, x) * sin(y));
} else if (ix < 0x4096bbaa) {
/* x < 1455: scale to avoid overflow */
- z = __ldexp_cexp(cpack(fabs(x), y), -1);
- return cpack(creal(z), cimag(z) * copysign(1, x));
+ z = __ldexp_cexp(CMPLX(fabs(x), y), -1);
+ return CMPLX(creal(z), cimag(z) * copysign(1, x));
} else {
/* x >= 1455: the result always overflows */
h = huge * x;
- return cpack(h * h * cos(y), h * sin(y));
+ return CMPLX(h * h * cos(y), h * sin(y));
}
}
@@ -85,7 +85,7 @@ double complex ccosh(double complex z)
* the same as d(NaN).
*/
if ((ix | lx) == 0 && iy >= 0x7ff00000)
- return cpack(y - y, copysign(0, x * (y - y)));
+ return CMPLX(y - y, copysign(0, x * (y - y)));
/*
* cosh(+-Inf +- I 0) = +Inf + I (+-)(+-)0.
@@ -95,8 +95,8 @@ double complex ccosh(double complex z)
*/
if ((iy | ly) == 0 && ix >= 0x7ff00000) {
if (((hx & 0xfffff) | lx) == 0)
- return cpack(x * x, copysign(0, x) * y);
- return cpack(x * x, copysign(0, (x + x) * y));
+ return CMPLX(x * x, copysign(0, x) * y);
+ return CMPLX(x * x, copysign(0, (x + x) * y));
}
/*
@@ -108,7 +108,7 @@ double complex ccosh(double complex z)
* nonzero x. Choice = don't raise (except for signaling NaNs).
*/
if (ix < 0x7ff00000 && iy >= 0x7ff00000)
- return cpack(y - y, x * (y - y));
+ return CMPLX(y - y, x * (y - y));
/*
* cosh(+-Inf + I NaN) = +Inf + I d(NaN).
@@ -121,8 +121,8 @@ double complex ccosh(double complex z)
*/
if (ix >= 0x7ff00000 && ((hx & 0xfffff) | lx) == 0) {
if (iy >= 0x7ff00000)
- return cpack(x * x, x * (y - y));
- return cpack((x * x) * cos(y), x * sin(y));
+ return CMPLX(x * x, x * (y - y));
+ return CMPLX((x * x) * cos(y), x * sin(y));
}
/*
@@ -136,5 +136,5 @@ double complex ccosh(double complex z)
* Optionally raises the invalid floating-point exception for finite
* nonzero y. Choice = don't raise (except for signaling NaNs).
*/
- return cpack((x * x) * (y - y), (x + x) * (y - y));
+ return CMPLX((x * x) * (y - y), (x + x) * (y - y));
}