summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/s_csqrtl.c
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2015-06-25 13:01:10 +0000
committertijl <tijl@FreeBSD.org>2015-06-25 13:01:10 +0000
commit95fcbd85e830ba474dede020a3b792ae31138e2b (patch)
treea7fbd9fa2cff8aeacad80e2cea7c6a1651531374 /lib/msun/src/s_csqrtl.c
parent91e9d26e116c48b2b63d0153154f28797795a07f (diff)
downloadFreeBSD-src-95fcbd85e830ba474dede020a3b792ae31138e2b.zip
FreeBSD-src-95fcbd85e830ba474dede020a3b792ae31138e2b.tar.gz
MFC r271651, r271719, r272138, r272457, r272845, r275476, r275518, r275614,
r275819, r276176, r278154, r278160, r278339, r279127, r279240, r279491, r279493, r279856, r283032, r284423, r284426, r284427, r284428 Merge changes to libm from the past 9 months. This includes improvements to the Bessel functions and adds the C99 function lgammal.
Diffstat (limited to 'lib/msun/src/s_csqrtl.c')
-rw-r--r--lib/msun/src/s_csqrtl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/msun/src/s_csqrtl.c b/lib/msun/src/s_csqrtl.c
index dd18e1e..ea2ef27 100644
--- a/lib/msun/src/s_csqrtl.c
+++ b/lib/msun/src/s_csqrtl.c
@@ -58,12 +58,12 @@ csqrtl(long double complex z)
/* Handle special cases. */
if (z == 0)
- return (cpackl(0, b));
+ return (CMPLXL(0, b));
if (isinf(b))
- return (cpackl(INFINITY, b));
+ return (CMPLXL(INFINITY, b));
if (isnan(a)) {
t = (b - b) / (b - b); /* raise invalid if b is not a NaN */
- return (cpackl(a, t)); /* return NaN + NaN i */
+ return (CMPLXL(a, t)); /* return NaN + NaN i */
}
if (isinf(a)) {
/*
@@ -73,9 +73,9 @@ csqrtl(long double complex z)
* csqrt(-inf + y i) = 0 + inf i
*/
if (signbit(a))
- return (cpackl(fabsl(b - b), copysignl(a, b)));
+ return (CMPLXL(fabsl(b - b), copysignl(a, b)));
else
- return (cpackl(a, copysignl(b - b, b)));
+ return (CMPLXL(a, copysignl(b - b, b)));
}
/*
* The remaining special case (b is NaN) is handled just fine by
@@ -94,10 +94,10 @@ csqrtl(long double complex z)
/* Algorithm 312, CACM vol 10, Oct 1967. */
if (a >= 0) {
t = sqrtl((a + hypotl(a, b)) * 0.5);
- result = cpackl(t, b / (2 * t));
+ result = CMPLXL(t, b / (2 * t));
} else {
t = sqrtl((-a + hypotl(a, b)) * 0.5);
- result = cpackl(fabsl(b) / (2 * t), copysignl(t, b));
+ result = CMPLXL(fabsl(b) / (2 * t), copysignl(t, b));
}
/* Rescale. */
OpenPOWER on IntegriCloud