about summary refs log tree commit diff
path: root/src/complex/cexpf.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-11-15 08:37:58 -0500
committerRich Felker <dalias@aerifal.cx>2012-11-15 08:37:58 -0500
commit8bb181622222f2ee3462c8b021bcae4fcdbbd37a (patch)
tree166a1be834c8cd5a4c2521d41d7ee506bd8c8e51 /src/complex/cexpf.c
parent22781b4d8ecaf97ac52d2a501a2e7d3bc1920ce0 (diff)
parent68847ecd3a644d3ffd9be58603be1a3fa437dff0 (diff)
downloadmusl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.tar.gz
musl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.tar.xz
musl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.zip
Merge remote-tracking branch 'nsz/math'
Diffstat (limited to 'src/complex/cexpf.c')
-rw-r--r--src/complex/cexpf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/complex/cexpf.c b/src/complex/cexpf.c
index 0cf13a3d..1a09964c 100644
--- a/src/complex/cexpf.c
+++ b/src/complex/cexpf.c
@@ -44,22 +44,22 @@ float complex cexpf(float complex z)
 
 	/* cexp(x + I 0) = exp(x) + I 0 */
 	if (hy == 0)
-		return cpackf(expf(x), y);
+		return CMPLXF(expf(x), y);
 	GET_FLOAT_WORD(hx, x);
 	/* cexp(0 + I y) = cos(y) + I sin(y) */
 	if ((hx & 0x7fffffff) == 0)
-		return cpackf(cosf(y), sinf(y));
+		return CMPLXF(cosf(y), sinf(y));
 
 	if (hy >= 0x7f800000) {
 		if ((hx & 0x7fffffff) != 0x7f800000) {
 			/* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */
-			return cpackf(y - y, y - y);
+			return CMPLXF(y - y, y - y);
 		} else if (hx & 0x80000000) {
 			/* cexp(-Inf +- I Inf|NaN) = 0 + I 0 */
-			return cpackf(0.0, 0.0);
+			return CMPLXF(0.0, 0.0);
 		} else {
 			/* cexp(+Inf +- I Inf|NaN) = Inf + I NaN */
-			return cpackf(x, y - y);
+			return CMPLXF(x, y - y);
 		}
 	}
 
@@ -78,6 +78,6 @@ float complex cexpf(float complex z)
 		 *  -  x = NaN (spurious inexact exception from y)
 		 */
 		exp_x = expf(x);
-		return cpackf(exp_x * cosf(y), exp_x * sinf(y));
+		return CMPLXF(exp_x * cosf(y), exp_x * sinf(y));
 	}
 }