From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116729 invoked by alias); 23 Jun 2015 14:36:19 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 116256 invoked by uid 55); 23 Jun 2015 14:36:15 -0000 From: "cvs-commit at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug math/18219] exp2, exp2f spurious underflows Date: Tue, 23 Jun 2015 14:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Version: 2.21 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00243.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18219 --- Comment #2 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, master has been updated via b59549574efeeecf124de05c9183c120eaaa56f0 (commit) from b57525f1a376149840f740a31535681c07152ba4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b59549574efeeecf124de05c9183c120eaaa56f0 commit b59549574efeeecf124de05c9183c120eaaa56f0 Author: Joseph Myers Date: Tue Jun 23 14:35:18 2015 +0000 Fix exp2, exp2f spurious underflows (bug 18219). The dbl-64 and flt-32 implementations of exp2 functions produce spurious underflow exceptions. The underlying reason is the same in both cases: the computation works as (2^a - 1)*2^b + 2^b for suitably chosen a and b, where a has small magnitude so 2^a - 1 can be computed with a low-degree polynomial approximation, and (2^a - 1)*2^b can underflow even when the final result does not. This patch fixes this by adjusting the threshold for when scaling is used to avoid intermediate underflow so it works for any possible value of a where the final result would not underflow. Tested for x86_64 and x86. [BZ #18219] * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Reduce threshold on absolute value of exponent for which scaling is used. * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise. * math/auto-libm-test-in: Add more tests of exp2. * math/auto-libm-test-out: Regenerated. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 ++ NEWS | 12 ++-- math/auto-libm-test-in | 7 ++ math/auto-libm-test-out | 175 ++++++++++++++++++++++++++++++++++++++ sysdeps/ieee754/dbl-64/e_exp2.c | 4 +- sysdeps/ieee754/flt-32/e_exp2f.c | 4 +- 6 files changed, 203 insertions(+), 8 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug.