summaryrefslogtreecommitdiff
path: root/src/complex/cexp.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/cexp.c
parent22781b4d8ecaf97ac52d2a501a2e7d3bc1920ce0 (diff)
parent68847ecd3a644d3ffd9be58603be1a3fa437dff0 (diff)
downloadmusl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.tar.gz
Merge remote-tracking branch 'nsz/math'
Diffstat (limited to 'src/complex/cexp.c')
-rw-r--r--src/complex/cexp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/complex/cexp.c b/src/complex/cexp.c
index 3b8bb752..5118e00e 100644
--- a/src/complex/cexp.c
+++ b/src/complex/cexp.c
@@ -44,22 +44,22 @@ double complex cexp(double complex z)
/* cexp(x + I 0) = exp(x) + I 0 */
if ((hy | ly) == 0)
- return cpack(exp(x), y);
+ return CMPLX(exp(x), y);
EXTRACT_WORDS(hx, lx, x);
/* cexp(0 + I y) = cos(y) + I sin(y) */
if (((hx & 0x7fffffff) | lx) == 0)
- return cpack(cos(y), sin(y));
+ return CMPLX(cos(y), sin(y));
if (hy >= 0x7ff00000) {
if (lx != 0 || (hx & 0x7fffffff) != 0x7ff00000) {
/* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */
- return cpack(y - y, y - y);
+ return CMPLX(y - y, y - y);
} else if (hx & 0x80000000) {
/* cexp(-Inf +- I Inf|NaN) = 0 + I 0 */
- return cpack(0.0, 0.0);
+ return CMPLX(0.0, 0.0);
} else {
/* cexp(+Inf +- I Inf|NaN) = Inf + I NaN */
- return cpack(x, y - y);
+ return CMPLX(x, y - y);
}
}
@@ -78,6 +78,6 @@ double complex cexp(double complex z)
* - x = NaN (spurious inexact exception from y)
*/
exp_x = exp(x);
- return cpack(exp_x * cos(y), exp_x * sin(y));
+ return CMPLX(exp_x * cos(y), exp_x * sin(y));
}
}