26_numerics/complex/13450.cc and IBM long double
Joseph S. Myers
joseph@codesourcery.com
Tue Nov 14 14:58:00 GMT 2006
The libstdc++ test 26_numerics/complex/13450.cc 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
commit?
2006-11-14 Joseph Myers <joseph@codesourcery.com>
* testsuite/26_numerics/complex/13450.cc: Do not test long double
in IBM long double case.
Index: libstdc++-v3/testsuite/26_numerics/complex/13450.cc
===================================================================
--- libstdc++-v3/testsuite/26_numerics/complex/13450.cc (revision 118811)
+++ libstdc++-v3/testsuite/26_numerics/complex/13450.cc (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);
+#endif
}
int main()
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list