From 65c323f2acb531fdc7a380af88f3ac0c8e435c02 Mon Sep 17 00:00:00 2001 From: Tijl Coosemans Date: Mon, 15 Jun 2015 20:47:26 +0000 Subject: [PATCH] Follow up to r284427: fix NaN mixing for ctanhf too. --- lib/msun/src/s_ctanhf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/msun/src/s_ctanhf.c b/lib/msun/src/s_ctanhf.c index 6f3be9768c12..520bf77d6d5c 100644 --- a/lib/msun/src/s_ctanhf.c +++ b/lib/msun/src/s_ctanhf.c @@ -51,7 +51,8 @@ ctanhf(float complex z) if (ix >= 0x7f800000) { if (ix & 0x7fffff) - return (CMPLXF(x, (y == 0 ? y : x * y))); + return (CMPLXF((x + 0) * (y + 0), + y == 0 ? y : (x + 0) * (y + 0))); SET_FLOAT_WORD(x, hx - 0x40000000); return (CMPLXF(x, copysignf(0, isinf(y) ? y : sinf(y) * cosf(y))));