From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 3B0DD3858C27; Thu, 12 Jan 2023 06:21:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B0DD3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673504517; bh=t6Q4m2bQOCGEBlXa8T90sJkL1AKEIYHwb/m7uKMNWmg=; h=From:To:Subject:Date:From; b=yqj6C79qYTP/97PdVkxPhobDE2I+6vRpnzr30+fkf6n8ktVwWvjj0IijAk6Hlf/ii 5HZpHLwCJ465VXnF1o32CDHzHAwKYMD1WCKRuBj/VX/YOdVImbFfhXYA26F/5QNsW6 egsg4NqFKNoSIjBcv0L8SPeA0b9QBTIyoYeNXjqo= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] s_sincosf.h: Change pio4 type to float [BZ #28713] X-Act-Checkin: glibc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: 80b24b86548eee3d96130a48e760d1d6c2e0c587 X-Git-Newrev: c5c666f34939d4bbf73aac8b753ab39621ebf33c Message-Id: <20230112062157.3B0DD3858C27@sourceware.org> Date: Thu, 12 Jan 2023 06:21:57 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c5c666f34939d4bbf73aac8b753ab39621ebf33c commit c5c666f34939d4bbf73aac8b753ab39621ebf33c Author: H.J. Lu Date: Mon Dec 20 14:37:26 2021 -0800 s_sincosf.h: Change pio4 type to float [BZ #28713] s_cosf.c and s_sinf.c have if (abstop12 (y) < abstop12 (pio4)) where abstop12 takes a float argument, but pio4 is static const double. pio4 is used only in calls to abstop12 and never in arithmetic. Apply -static const double pio4 = 0x1.921FB54442D18p-1; +static const float pio4 = 0x1.921FB6p-1f; to fix: FAIL: math/test-float-cos FAIL: math/test-float-sin FAIL: math/test-float-sincos FAIL: math/test-float32-cos FAIL: math/test-float32-sin FAIL: math/test-float32-sincos when compiling with GCC 12. Reviewed-by: Paul Zimmermann (cherry picked from commit d3e4f5a1014db09ff1c62c6506f92cba469e193d) Diff: --- sysdeps/ieee754/flt-32/s_sincosf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/ieee754/flt-32/s_sincosf.h b/sysdeps/ieee754/flt-32/s_sincosf.h index 125ab7f846..372d8542c2 100644 --- a/sysdeps/ieee754/flt-32/s_sincosf.h +++ b/sysdeps/ieee754/flt-32/s_sincosf.h @@ -24,7 +24,7 @@ /* 2PI * 2^-64. */ static const double pi63 = 0x1.921FB54442D18p-62; /* PI / 4. */ -static const double pio4 = 0x1.921FB54442D18p-1; +static const float pio4 = 0x1.921FB6p-1f; /* Polynomial data (the cosine polynomial is negated in the 2nd entry). */ extern const sincos_t __sincosf_table[2] attribute_hidden;