This is the mail archive of the mailing list for the GCC 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]

26_numerics/complex/ and IBM long double

The libstdc++ test 26_numerics/complex/ cannot work reliably for 
IBM long double, since we define epsilon correctly for this type which 
means 100 * epsilon can be smaller than 1ulp for a particular long double 
value (and so the test is only likely to pass if all three computed 
complex values are actually identical).  Thus this patch disables the long 
double testing in this testcase for the IBM long double case.  OK to 

2006-11-14  Joseph Myers  <>

	* testsuite/26_numerics/complex/ Do not test long double
	in IBM long double case.

Index: libstdc++-v3/testsuite/26_numerics/complex/
--- libstdc++-v3/testsuite/26_numerics/complex/	(revision 118811)
+++ libstdc++-v3/testsuite/26_numerics/complex/	(working copy)
@@ -61,6 +61,11 @@
   d2 = 1.4;
   test01_do(d1, d2);
+#if __LDBL_MANT_DIG__ != 106
+  /* For IBM long double, epsilon is too small (since 1.0 plus any
+     double is representable) to be able to expect results within
+     epsilon * 100 (which may be much less than 1ulp for a particular
+     long double value).  */
   long double ld1 = -1.0l;
   long double ld2 = 0.5l;
   test01_do(ld1, ld2);
@@ -68,6 +73,7 @@
   ld1 = -3.2l;
   ld2 = 1.4l;
   test01_do(ld1, ld2);
 int main()

Joseph S. Myers

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