From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21102 invoked by alias); 30 Apr 2013 14:19:47 -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 21072 invoked by uid 48); 30 Apr 2013 14:19:44 -0000 From: "azanella at linux dot vnet.ibm.com" To: glibc-bugs@sourceware.org Subject: [Bug math/15418] New: PowerPC: spurious overflow for hypot Date: Tue, 30 Apr 2013 14:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: azanella at linux dot vnet.ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00252.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15418 Bug #: 15418 Summary: PowerPC: spurious overflow for hypot Product: glibc Version: 2.18 Status: NEW Severity: normal Priority: P2 Component: math AssignedTo: unassigned@sourceware.org ReportedBy: azanella@linux.vnet.ibm.com Classification: Unclassified The hypot implementation for PowerPC (sysdeps/powerpc/fpu/e_hypot.c) generates spurious overflow exception for subnormal arguments. This is due it checks if arg1/arg2 > 2^60 (arg1 > arg2) by using a FP division. A possible fix would be to instead of check: if (arg1/arg2 > 2^60) return x+y To check: if (arg2 > (LDBL_MAX/2^60)) if (x/y > 2^60) return x+y else if (x > (y*2^60) return x+y The FP division will be use only for large inputs. I will send a patch to libc-alpha with a fix. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.