This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-113-g45adef3


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  45adef3cf2057aa1f7e2b7479e5f1bcb7506140c (commit)
      from  d4b17258bba38f206079fbae1e7255779db1b74c (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45adef3cf2057aa1f7e2b7479e5f1bcb7506140c

commit 45adef3cf2057aa1f7e2b7479e5f1bcb7506140c
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Mar 4 14:16:25 2014 +0000

    Fix libm-test.inc:print_complex_max_error handling of some error cases.
    
    When regenerating ulps incrementally with "make regen-ulps", the
    resulting diffs should only increase existing ulps, never decrease
    them.  This allows successive uses of "make regen-ulps" on different
    hardware or with different compiler configurations to accumulate ulps
    that are sufficient for tests to pass in a variety of configurations.
    
    However, sometimes changes that decrease ulps are wrongly generated;
    thus, when applying
    <https://sourceware.org/ml/libc-alpha/2014-02/msg00605.html> I had to
    remove such changes manually.  The problem is
    print_complex_max_error.  If the ulps for either the real or the
    imaginary part of a function are out of range, this function prints
    the maximum ulps seen for both parts, which then replace those
    previously in libm-test-ulps.  So if the ulps for one part are bigger
    than recorded before, but those for the other part are smaller, the
    diffs reduce existing ulps.
    
    This patch fixes the logic so that only increased ulps get printed.
    
    Tested x86_64 ("make math/tests", and "make regen-ulps" in a situation
    with ulps manually modified so one part would go up and the other
    down, to confirm the changes have the intended effect then).
    
    	* math/libm-test.inc (print_complex_max_error): Check separately
    	whether real and imaginary errors are within allowed range and
    	pass 0 to print_complex_function_ulps instead of value within
    	allowed range.

diff --git a/ChangeLog b/ChangeLog
index cdb5b85..a808e73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-03-04  Joseph Myers  <joseph@codesourcery.com>
+
+	* math/libm-test.inc (print_complex_max_error): Check separately
+	whether real and imaginary errors are within allowed range and
+	pass 0 to print_complex_function_ulps instead of value within
+	allowed range.
+
 2014-03-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* libio/tst-ftell-active-handler.c (get_handles_fdopen): Fix
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 3712292..4cb239f 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -568,19 +568,26 @@ static void
 print_complex_max_error (const char *func_name)
 {
   __complex__ FLOAT allowed = find_complex_function_ulps (func_name);
-  int ok = 0;
+  int real_ok = 0, imag_ok = 0, ok;
 
-  if ((real_max_error == 0 && imag_max_error == 0)
-      || (real_max_error <= __real__ allowed
-	  && imag_max_error <= __imag__ allowed
-	  && !ignore_max_ulp))
+  if (real_max_error == 0
+      || (real_max_error <= __real__ allowed && !ignore_max_ulp))
     {
-      ok = 1;
+      real_ok = 1;
     }
 
-  if (!ok)
-    print_complex_function_ulps (func_name, real_max_error, imag_max_error);
+  if (imag_max_error == 0
+      || (imag_max_error <= __imag__ allowed && !ignore_max_ulp))
+    {
+      imag_ok = 1;
+    }
+
+  ok = real_ok && imag_ok;
 
+  if (!ok)
+    print_complex_function_ulps (func_name,
+				 real_ok ? 0 : real_max_error,
+				 imag_ok ? 0 : imag_max_error);
 
   if (print_screen_max_error (ok))
     {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    7 +++++++
 math/libm-test.inc |   23 +++++++++++++++--------
 2 files changed, 22 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]