public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug math/14468] New: Inaccurate j0f function @ 2012-08-15 13:59 liubov.dmitrieva at gmail dot com 2012-08-15 14:24 ` [Bug math/14468] " liubov.dmitrieva at gmail dot com ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: liubov.dmitrieva at gmail dot com @ 2012-08-15 13:59 UTC (permalink / raw) To: glibc-bugs http://sourceware.org/bugzilla/show_bug.cgi?id=14468 Bug #: 14468 Summary: Inaccurate j0f function Product: glibc Version: 2.17 Status: NEW Severity: normal Priority: P2 Component: math AssignedTo: unassigned@sourceware.org ReportedBy: liubov.dmitrieva@gmail.com Classification: Unclassified Test case: // gcc main.c -std=c99 -lm #include <stdio.h> #include <fenv.h> #include <stdlib.h> // abs function for int argument extern float j0f(float); extern double j0(double); #define i32(a) (((int*)&(a))[0]) int main() { float a,r1,r2; i32(a)=0x413caa1f; //argument fesetround(FE_TONEAREST); r1 = j0f(a); //actual result r2 = j0(a); //actual result 2 printf("inputs: a = (0x%08x)\t%e\n", i32(a), a); printf("actual = (0x%08x)\t%.13e\n", i32(r1), r1); printf("expected = (0x%08x)\t%.13e\n", i32(r2), r2); printf("error = %d ulp\n", abs(i32(r1) - i32(r2))); return 0; } Result: inputs: a = (0x413caa1f) 1.179153e+01 actual = (0xb471e828) -2.2529331999976e-07 expected = (0xb471d452) -2.2522115727952e-07 error = 5078 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/14468] Inaccurate j0f function 2012-08-15 13:59 [Bug math/14468] New: Inaccurate j0f function liubov.dmitrieva at gmail dot com @ 2012-08-15 14:24 ` liubov.dmitrieva at gmail dot com 2012-08-15 15:03 ` joseph at codesourcery dot com 2014-06-17 18:39 ` fweimer at redhat dot com 2 siblings, 0 replies; 4+ messages in thread From: liubov.dmitrieva at gmail dot com @ 2012-08-15 14:24 UTC (permalink / raw) To: glibc-bugs http://sourceware.org/bugzilla/show_bug.cgi?id=14468 Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> 2012-08-15 14:24:41 UTC --- Duplicate, was filed twice due to network connection problems. *** This bug has been marked as a duplicate of bug 14469 *** -- 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/14468] Inaccurate j0f function 2012-08-15 13:59 [Bug math/14468] New: Inaccurate j0f function liubov.dmitrieva at gmail dot com 2012-08-15 14:24 ` [Bug math/14468] " liubov.dmitrieva at gmail dot com @ 2012-08-15 15:03 ` joseph at codesourcery dot com 2014-06-17 18:39 ` fweimer at redhat dot com 2 siblings, 0 replies; 4+ messages in thread From: joseph at codesourcery dot com @ 2012-08-15 15:03 UTC (permalink / raw) To: glibc-bugs http://sourceware.org/bugzilla/show_bug.cgi?id=14468 --- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-08-15 15:03:06 UTC --- Could you please give versions of the tests, for all your recent bugs, that represent the test argument using a hex float value rather than by violating ISO C aliasing rules (type punning int and float)? Hex float values are generally more convenient to deal with; you can put them directly in tests in libm-test.inc, or use them with MPFR to confirm the correct results. -- 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/14468] Inaccurate j0f function 2012-08-15 13:59 [Bug math/14468] New: Inaccurate j0f function liubov.dmitrieva at gmail dot com 2012-08-15 14:24 ` [Bug math/14468] " liubov.dmitrieva at gmail dot com 2012-08-15 15:03 ` joseph at codesourcery dot com @ 2014-06-17 18:39 ` fweimer at redhat dot com 2 siblings, 0 replies; 4+ messages in thread From: fweimer at redhat dot com @ 2014-06-17 18:39 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=14468 Florian Weimer <fweimer at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fweimer at redhat dot com Flags| |security- -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-17 18:39 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-08-15 13:59 [Bug math/14468] New: Inaccurate j0f function liubov.dmitrieva at gmail dot com 2012-08-15 14:24 ` [Bug math/14468] " liubov.dmitrieva at gmail dot com 2012-08-15 15:03 ` joseph at codesourcery dot com 2014-06-17 18:39 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).