From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16777 invoked by alias); 24 Oct 2012 08:08:10 -0000 Received: (qmail 16627 invoked by uid 48); 24 Oct 2012 08:07:41 -0000 From: "JoshuaHopp at web dot de" To: glibc-bugs@sources.redhat.com Subject: [Bug math/14759] New: Most functions in math.h not correctly rounded Date: Wed, 24 Oct 2012 08:08: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: JoshuaHopp at web dot de 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 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 X-SW-Source: 2012-10/txt/msg00216.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14759 Bug #: 14759 Summary: Most functions in math.h not correctly rounded Product: glibc Version: 2.15 Status: NEW Severity: normal Priority: P2 Component: math AssignedTo: unassigned@sourceware.org ReportedBy: JoshuaHopp@web.de Classification: Unclassified Host: x86_64 Target: x86_64 Build: linux-gnu Most functions in math.h do not use correct rounding. Example: //--- snip --- #include #include #include int main() { double x = 1.0; // 1.0 is exact fesetround(FE_DOWNWARD); double a = asin(x); fesetround(FE_UPWARD); double b = asin(x); // asin(1) == pi/2, which is not exactly representable // so, assuming correct rounding, a should be less than b assert(a < b); } //--- snap --- Compile with "gcc -lm" (or even "gcc -lm -ffloat-store -frounding-math"). Run the example: main: Assertion `a < b' failed. Similar results can be obtained with exp, cos, acos, atan, sinh, cosh, atanh, asinh and acosh. ------ Kernel version: 3.5.2-1.fc17 gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC) GNU ld version 2.22.52.0.1-10.fc17 20120131 -- 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.