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: Add tests for underflow exception bugs 10846, 14036


On 05/24/2012 04:57 PM, Joseph S. Myers wrote:
Now that libm-test.inc can test underflow exceptions, I propose this
patch to add tests for two bugs about missing underflow exceptions
(fixed by the changes to use -frounding-math).  Tested x86 and x86_64.

2012-05-24 Joseph Myers<joseph@codesourcery.com>

	[BZ #10846]
	[BZ #14036]
	* math/libm-test.inc (exp_test): Add test from bug 14036.
	(pow_test): Add test from bug 10846.

Thanks, this is ok,


Andreas

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 5424866..f545723 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -3501,6 +3501,7 @@ exp_test (void)

  #if !(defined TEST_LDOUBLE&&  LDBL_MAX_EXP>  1024)
    TEST_f_f (exp, 710, plus_infty, OVERFLOW_EXCEPTION);
+  TEST_f_f (exp, -1234, plus_zero, UNDERFLOW_EXCEPTION);
  #endif
    TEST_f_f (exp, 1e5, plus_infty, OVERFLOW_EXCEPTION);
    TEST_f_f (exp, max_value, plus_infty, OVERFLOW_EXCEPTION);
@@ -6732,6 +6733,8 @@ pow_test (void)
    TEST_ff_f (pow, 0x1.0000000000001p0L, -0x1.23456789abcdfp61L, 1.0118762747828234466621210689458255908670e-253L);
  #endif

+  TEST_ff_f (pow, 2.0L, -100000.0L, plus_zero, UNDERFLOW_EXCEPTION);
+
    END (pow);
  }




--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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