From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 26B703857C55; Fri, 7 Aug 2020 19:33:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26B703857C55 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] math: Fix inaccuracy of j0f for x >= 2^127 when sin(x)+cos(x) is tiny X-Act-Checkin: glibc X-Git-Author: Paul Zimmermann X-Git-Refname: refs/heads/master X-Git-Oldrev: 1cfb4715288845ebc55ad664421b48b32de9599c X-Git-Newrev: b7dd366dbeeff3016d0554c08a5f5c8cfe4c31d1 Message-Id: <20200807193334.26B703857C55@sourceware.org> Date: Fri, 7 Aug 2020 19:33:34 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2020 19:33:34 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b7dd366dbeeff3016d0554c08a5f5c8cfe4c31d1 commit b7dd366dbeeff3016d0554c08a5f5c8cfe4c31d1 Author: Paul Zimmermann Date: Fri Aug 7 16:14:53 2020 -0300 math: Fix inaccuracy of j0f for x >= 2^127 when sin(x)+cos(x) is tiny Checked on x86_64-linux-gnu and i686-linux-gnu. Diff: --- math/auto-libm-test-in | 2 ++ sysdeps/ieee754/flt-32/e_j0f.c | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index 4414e54d93..5d488a8711 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -5748,6 +5748,8 @@ j0 0x1p16382 j0 0x1p16383 # the next value generates larger error bounds on x86_64 (binary32) j0 0x2.602774p+0 xfail-rounding:ibm128-libgcc +# the next value exercises the flt-32 code path for x >= 2^127 +j0 0x8.2f4ecp+124 j1 -1.0 j1 0.0 diff --git a/sysdeps/ieee754/flt-32/e_j0f.c b/sysdeps/ieee754/flt-32/e_j0f.c index c89b9f2688..5d29611eb7 100644 --- a/sysdeps/ieee754/flt-32/e_j0f.c +++ b/sysdeps/ieee754/flt-32/e_j0f.c @@ -55,7 +55,22 @@ __ieee754_j0f(float x) z = -__cosf(x+x); if ((s*c)