[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ilmbase



Hi,

Also, is this the only test that's failing?

Nope, there was another one later on IIRC. I'll disable the PosQNan2 and NegQNan* checks and investigate.

It so turns out that NaN handling by the testsuite was all that fails on my machine, due to compiler and binutils assumptions about what's counting as NaN on m68k. Basically, cpp does substitute anything that it knows to not represent a valid float by a const nan of positive sign.

The following patch to the HalfTest suite makes the testsuite failure go away. Please apply. In the alternative, please indicate whether a binNMU would be in order.

	Michael

--- ilmbase-1.0.1/HalfTest/testClassification.cpp.org	2008-04-28 01:21:13.000000000 +0200
+++ ilmbase-1.0.1/HalfTest/testClassification.cpp	2008-04-28 00:19:22.000000000 +0200
@@ -156,9 +156,10 @@
     testClass (-0.3,			1,   1,   0,   0,   0,   0,   1);
     testClass (-HALF_MAX,		1,   1,   0,   0,   0,   0,   1);
     testClass (floatNegInfinity(),	0,   0,   0,   0,   0,   1,   1);
+#ifndef __mc68000__
     testClass (floatNegQNan1(),		0,   0,   0,   0,   1,   0,   1);
     testClass (floatNegQNan2(),		0,   0,   0,   0,   1,   0,   1);
-
+#endif
     cout << "\n";

     testClass (half::posInf(),		0,   0,   0,   0,   0,   1,   0);
--- ilmbase-1.0.1/HalfTest/testBitPatterns.cpp.org	2008-04-28 01:21:51.000000000 +0200
+++ ilmbase-1.0.1/HalfTest/testBitPatterns.cpp	2008-04-27 23:57:37.000000000 +0200
@@ -305,9 +305,11 @@
     testBits (floatPosQNan1(),
 	      "0 11111 1111111111",			// nan
 	      "0 11111111 11111111110000000000000");	// nan
+#ifndef __mc68000__
     testBits (floatPosQNan2(),
 	      "0 11111 1010101010",			// nan
 	      "0 11111111 10101010100000000000000");	// nan
+#endif

     //
     // Numbers close to -1.0
@@ -473,12 +475,14 @@
     testBits (floatNegInfinity(),
 	      "1 11111 0000000000",			// +infinity
 	      "1 11111111 00000000000000000000000");	// +infinity
+#ifndef __mc68000__
     testBits (floatNegQNan1(),
 	      "1 11111 1111111111",			// nan
 	      "1 11111111 11111111110000000000000");	// nan
     testBits (floatNegQNan2(),
 	      "1 11111 1010101010",			// nan
 	      "1 11111111 10101010100000000000000");	// nan
+#endif

     cout << "ok\n\n" << flush;
 }


Reply to: