summaryrefslogtreecommitdiffstats
path: root/lib/msun/ld80
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2014-12-16 09:21:56 +0000
committered <ed@FreeBSD.org>2014-12-16 09:21:56 +0000
commit3f8c0a666162f7c3930716c40ee6cd3b252487a4 (patch)
treef49cd325cda312901e36575562909270bd0b2525 /lib/msun/ld80
parent5efc0d37994401def22a6e988f3084fb96e193b0 (diff)
downloadFreeBSD-src-3f8c0a666162f7c3930716c40ee6cd3b252487a4.zip
FreeBSD-src-3f8c0a666162f7c3930716c40ee6cd3b252487a4.tar.gz
Rename cpack*() to CMPLX*().
The C11 standard introduced a set of macros (CMPLX, CMPLXF, CMPLXL) that can be used to construct complex numbers from a pair of real and imaginary numbers. Unfortunately, they require some compiler support, which is why we only define them for Clang and GCC>=4.7. The cpack() function in libm performs the same task as CMPLX(), but cannot be used to generate compile-time constants. This means that all invocations of cpack() can safely be replaced by C11's CMPLX(). To keep the code building with GCC 4.2, provide copies of CMPLX() that can at least be used to generate run-time complex numbers. This makes it easier to build some of the functions outside of libm.
Diffstat (limited to 'lib/msun/ld80')
-rw-r--r--lib/msun/ld80/k_expl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msun/ld80/k_expl.h b/lib/msun/ld80/k_expl.h
index ebfb9a8..9b081fa 100644
--- a/lib/msun/ld80/k_expl.h
+++ b/lib/msun/ld80/k_expl.h
@@ -299,7 +299,7 @@ __ldexp_cexpl(long double complex z, int expt)
scale2 = 1;
SET_LDBL_EXPSIGN(scale1, BIAS + expt - half_expt);
- return (cpackl(cos(y) * exp_x * scale1 * scale2,
+ return (CMPLXL(cos(y) * exp_x * scale1 * scale2,
sinl(y) * exp_x * scale1 * scale2));
}
#endif /* _COMPLEX_H */
OpenPOWER on IntegriCloud