diff options
author | Szabolcs Nagy <nsz@port70.net> | 2012-11-13 01:31:49 +0100 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2012-11-13 01:31:49 +0100 |
commit | cfbaba79a2dd380e580a247b8fd36af60c878e8f (patch) | |
tree | a002987af1ea7652985973f8db98d2d4f8b6064a /src/complex/cexpf.c | |
parent | e2fe959fe2a450f74271d4d3c4b0d9456f889125 (diff) | |
download | musl-cfbaba79a2dd380e580a247b8fd36af60c878e8f.tar.gz musl-cfbaba79a2dd380e580a247b8fd36af60c878e8f.tar.xz musl-cfbaba79a2dd380e580a247b8fd36af60c878e8f.zip |
complex: add C11 CMPLX macros and replace cpack with them
Diffstat (limited to 'src/complex/cexpf.c')
-rw-r--r-- | src/complex/cexpf.c | 12 |
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)); } } |