From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19801 invoked by alias); 16 Aug 2012 07:52:08 -0000 Received: (qmail 19768 invoked by uid 22791); 16 Aug 2012 07:52:05 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Aug 2012 07:51:50 +0000 From: "liubov.dmitrieva at gmail dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug math/14473] Inaccurate CPOWF function on x86_32 and x86_64 Date: Thu, 16 Aug 2012 07:52: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: liubov.dmitrieva at gmail dot 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: In-Reply-To: References: 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-08/txt/msg00091.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14473 --- Comment #2 from Liubov Dmitrieva 2012-08-16 07:51:45 UTC --- Reformatted test case: #include #include #include #include #define real(a) (((float*)&(a))[0]) #define imag(a) (((float*)&(a))[1]) int main() { float _Complex a,b,r1; double _Complex r2; a=-0x1.1c71c8p-1 + I * -0x1.c71c7cp-4; //argument b= 0x1.1c71c6p-1 + I * -0x1.c71c7cp-4; //argument fesetround(FE_TONEAREST); r1 = cpowf(a,b); //actual result r2 = cpow(a,b); //actual result 2 printf("inputs: a = %15.6a + I * %15.6a\n", creal(a), cimag(a)); printf(" b = %15.6a + I * %15.6a\n", creal(b), cimag(b)); printf("actual = %15.6a + I * %15.6a\n", creal(r1),cimag(r1)); printf("expected = %15.6a + I * %15.6a\n", creal(r2),cimag(r2)); printf("error = %15f + I * %15f ulp\n", fabs(creal(r1) - creal(r2)) * exp2(23.0-logbf(creal(r1))), fabs(cimag(r1) - cimag(r2)) * exp2(23.0-logbf(cimag(r1))) ); return 0; } Results (same x86 and x86_64) inputs: a = -0x1.1c71c8p-1 + I * -0x1.c71c7cp-4 b = 0x1.1c71c6p-1 + I * -0x1.c71c7cp-4 actual = -0x1.df1246p-11 + I * -0x1.0d38dap-1 expected = -0x1.df1aefp-11 + I * -0x1.0d38d9p-1 error = 1108.410103 + I * 0.495932 ulp -- 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.