This is the mail archive of the libc-alpha@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]

Re: [PATCH] Fix bogus exceptions on exp(double)


On Wed, 22 Feb 2012, Joseph S. Myers wrote:

> On Tue, 21 Feb 2012, Aurelien Jarno wrote:
> 
> > This patch fixes exp(double) triggering bogus underflow and overflow
> > exceptions. More details are in:
> > 
> > http://sourceware.org/bugzilla/show_bug.cgi?id=13705
> > 
> > 
> > 2012-02-21  Aurelien Jarno  <aurelien@aurel32.net>
> > 
> > 	[BZ #13705]
> > 	* sysdeps/ieee754/dbl-64/w_exp.c(__exp): Use __kernel_standard 
> > 	instead of __kernel_standard_f.
> 
> This seems pretty obvious as fixing something that's clearly using the 
> wrong API to use the right one - but shouldn't there be a test added to 
> the testsuite for this bug, if it isn't triggered by existing tests?

Since there has apparently been no followup on adding the test and 
resubmitting this patch with test included, I've now committed the patch 
with the obvious testcase.

diff --git a/ChangeLog b/ChangeLog
index 85de3bd..6154bb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-08  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #13705]
+	* math/libm-test.inc (exp_test): Do not allow overflow exception
+	on underflow test.
+
 2012-04-08  Aurelien Jarno  <aurelien@aurel32.net>
 
 	[BZ #13705]
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 32bce45..35d014b 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -3003,8 +3003,7 @@ exp_test (void)
 
   /* Bug 13922: OVERFLOW exception may be missing.  */
   TEST_f_f (exp, max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
-  /* Bug 13705: spurious OVERFLOW exception may be present.  */
-  TEST_f_f (exp, -max_value, 0, OVERFLOW_EXCEPTION_OK);
+  TEST_f_f (exp, -max_value, 0);
 
   END (exp);
 }

-- 
Joseph S. Myers
joseph@codesourcery.com


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