@@ -62,23 +62,23 @@ ccosh(double complex z)
6262 /* Handle the nearly-non-exceptional cases where x and y are finite. */
6363 if (ix < 0x7ff00000 && iy < 0x7ff00000 ) {
6464 if ((iy | ly ) == 0 )
65- return (cpack (cosh (x ), x * y ));
65+ return (CMPLX (cosh (x ), x * y ));
6666 if (ix < 0x40360000 ) /* small x: normal case */
67- return (cpack (cosh (x ) * cos (y ), sinh (x ) * sin (y )));
67+ return (CMPLX (cosh (x ) * cos (y ), sinh (x ) * sin (y )));
6868
6969 /* |x| >= 22, so cosh(x) ~= exp(|x|) */
7070 if (ix < 0x40862e42 ) {
7171 /* x < 710: exp(|x|) won't overflow */
7272 h = exp (fabs (x )) * 0.5 ;
73- return (cpack (h * cos (y ), copysign (h , x ) * sin (y )));
73+ return (CMPLX (h * cos (y ), copysign (h , x ) * sin (y )));
7474 } else if (ix < 0x4096bbaa ) {
7575 /* x < 1455: scale to avoid overflow */
76- z = __ldexp_cexp (cpack (fabs (x ), y ), -1 );
77- return (cpack (creal (z ), cimag (z ) * copysign (1 , x )));
76+ z = __ldexp_cexp (CMPLX (fabs (x ), y ), -1 );
77+ return (CMPLX (creal (z ), cimag (z ) * copysign (1 , x )));
7878 } else {
7979 /* x >= 1455: the result always overflows */
8080 h = huge * x ;
81- return (cpack (h * h * cos (y ), h * sin (y )));
81+ return (CMPLX (h * h * cos (y ), h * sin (y )));
8282 }
8383 }
8484
@@ -92,7 +92,7 @@ ccosh(double complex z)
9292 * the same as d(NaN).
9393 */
9494 if ((ix | lx ) == 0 && iy >= 0x7ff00000 )
95- return (cpack (y - y , copysign (0 , x * (y - y ))));
95+ return (CMPLX (y - y , copysign (0 , x * (y - y ))));
9696
9797 /*
9898 * cosh(+-Inf +- I 0) = +Inf + I (+-)(+-)0.
@@ -102,8 +102,8 @@ ccosh(double complex z)
102102 */
103103 if ((iy | ly ) == 0 && ix >= 0x7ff00000 ) {
104104 if (((hx & 0xfffff ) | lx ) == 0 )
105- return (cpack (x * x , copysign (0 , x ) * y ));
106- return (cpack (x * x , copysign (0 , (x + x ) * y )));
105+ return (CMPLX (x * x , copysign (0 , x ) * y ));
106+ return (CMPLX (x * x , copysign (0 , (x + x ) * y )));
107107 }
108108
109109 /*
@@ -115,7 +115,7 @@ ccosh(double complex z)
115115 * nonzero x. Choice = don't raise (except for signaling NaNs).
116116 */
117117 if (ix < 0x7ff00000 && iy >= 0x7ff00000 )
118- return (cpack (y - y , x * (y - y )));
118+ return (CMPLX (y - y , x * (y - y )));
119119
120120 /*
121121 * cosh(+-Inf + I NaN) = +Inf + I d(NaN).
@@ -128,8 +128,8 @@ ccosh(double complex z)
128128 */
129129 if (ix >= 0x7ff00000 && ((hx & 0xfffff ) | lx ) == 0 ) {
130130 if (iy >= 0x7ff00000 )
131- return (cpack (x * x , x * (y - y )));
132- return (cpack ((x * x ) * cos (y ), x * sin (y )));
131+ return (CMPLX (x * x , x * (y - y )));
132+ return (CMPLX ((x * x ) * cos (y ), x * sin (y )));
133133 }
134134
135135 /*
@@ -143,13 +143,13 @@ ccosh(double complex z)
143143 * Optionally raises the invalid floating-point exception for finite
144144 * nonzero y. Choice = don't raise (except for signaling NaNs).
145145 */
146- return (cpack ((x * x ) * (y - y ), (x + x ) * (y - y )));
146+ return (CMPLX ((x * x ) * (y - y ), (x + x ) * (y - y )));
147147}
148148
149149DLLEXPORT double complex
150150ccos (double complex z )
151151{
152152
153153 /* ccos(z) = ccosh(I * z) */
154- return (ccosh (cpack (- cimag (z ), creal (z ))));
154+ return (ccosh (CMPLX (- cimag (z ), creal (z ))));
155155}
0 commit comments